> On 4 Sep 2017, at 10:44, JuhiMarcel LangbroekTimmerman <mt195...@gmail.com> 
> wrote:
> Thanks for your anwer. I assume there are a few things I can rely on;
> - the main thread is where the code starts and will always have id 1

That can not be relied on in general, I’m afraid.  However, after some 
discussion, it appears that there is some support for an "is-initial-thread” 


Note that the feeling is that you shouldn’t write code that depends on this.

> - a continuation of statements/blocks will always be excecuted on the same 
> thread except for those hyper thingies which are again separate blocks or 
> closures excecuted on other threads

I would say anything that either explicitly or implicitly does an await() in 
the future is not guaranteed to continue executing on the same thread.  Of 
course, the catch is in the “implicitly”: if you have complete control over 
your code, I guess you can be sure.  As soon as you start using 3rd party 
modules, I guess you could argue that all bets are off.

So this comes back to: why is it important to you to be sure that code 
continues to execute on the same thread?

> Is that correct?

Not sure  :-)


Reply via email to