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 know, the continuation is scheduled to be an idle callback against the main context, right? If so, then this would mean that an async functions in a thread B would only run in the B-context until the first 'yield', afterwards it would continue to run in the A-context -- obviously defeating the purpose of multithreading.
Async methods exist for us to be able to write coroutines without multithreading. When you use multiple threads, you don't need async at all.
Are my worries justified and if so, how could we fix that?
No, I don't think they are.
Cheers,
Attachment:
signature.asc
Description: Toto je digitálně podepsaná část zprávy