Michael 'Mickey' Lauer píše v Čt 14. 01. 2010 v 00:48 +0100:
Jörn's mail about threads and closures reminded me about a problem I
wanted to highlight here.
The addition of async functions in Vala is a very great feature, however
I wonder how this could work with multiple threads? As far as I
Ok, I just tried the following program:
=
void* thread_func_1()
{
var loop = new MainLoop();
async_func_1();
loop.run();
return null;
}
void* thread_func_2()
{
var loop = new MainLoop();
Looks like I spoke too soon. The attached program emits a wrong output:
** Message: thread.vala:43: main thread 14350
** Message: thread.vala:31: thread 14352
** Message: thread.vala:21: thread 14351
** Message: thread.vala:31: thread 14352
** Message: thread.vala:21: thread 14352
** Message: