First, your suggested pattern works great – in particular when wrapping the thread_get_message into a goal within another module – makes the code really clean.
But, I ran into a problem when trying to use transactions.
Basically, a transaction would wrap the whole code, including the async_process/.3 and if the overall code fails in the end, there should be a rollback.
But, currently, when wrapped into a transaction, the code stops processing – i.e. freezes the debugger and nothing happens without debugger.
Can this be made to work - or are there too many threaded calls interneaved that make the mechanism hang up.
thanks,
Dan