Re: Thread Safety of Punctuator Functions and Processor Contexts

2022-11-07 Thread Matthias J. Sax
Good point about the docs... I guess it must support concurrency do to IQ, which might iterator over the store while `process()` modifies it. I was only reasoning about `process()` and punctuation and forgot IQ. So it seems we indeed have this contract -- what is good new for you. However, I d

Re: Thread Safety of Punctuator Functions and Processor Contexts

2022-11-07 Thread Joshua Suskalo
"Matthias J. Sax" writes: > In general, it's not safe to keep the iterator open, because when process() is > executed in-between two punctuator calls, it might modify the store and > invalidate the iterator. There is no guarantee that the returned iterator > supports concurrency. This makes sens

Re: Thread Safety of Punctuator Functions and Processor Contexts

2022-11-07 Thread Matthias J. Sax
In general, it's not safe to keep the iterator open, because when process() is executed in-between two punctuator calls, it might modify the store and invalidate the iterator. There is no guarantee that the returned iterator supports concurrency. Hence, even if it happens that the currently us

Re: Thread Safety of Punctuator Functions and Processor Contexts

2022-11-07 Thread Joshua Suskalo
Hello Matthias, thanks for the response! "Matthias J. Sax" writes: > Spanning your own thread and calling context.forward() is _not_ safe, and > there > is currently no way for you to make is safe. The runtime code makes certain > assumptions about being single threaded which would break if yo