Confirmed users
214
edits
| Line 137: | Line 137: | ||
==== Interoperating between SIPCC Threads and nsThreads ==== | ==== Interoperating between SIPCC Threads and nsThreads ==== | ||
The right idiom here is that when we write to a thread using it's idiom. This means that when | |||
we have a pair of threads of different types, each needs to know about the other's idiom, | |||
but neither needs to change it's master event loop. The idea is shown below: | |||
http://www.websequencediagrams.com/cgi-bin/cdraw?lz=bnNUaHJlYWQgLT4gQ1BSIAAIBjogY3ByU2VuZE1lc3NhZ2UoKQoAEwogLT4gAC8IOiBEaXNwYXRjaCgpCg&s=default | |||
Note that this makes life kind of unpleasant when we want to write to an nsThread from C code in SIPCC | |||
because nsThread communication is by instantiating a nsIRunnable() class which is foreign linguistically | |||
to C. However, looking at the existing code it appears that we can isolate these calls to C++ code or | |||
make bridges to make those available. | |||
=== Important threads === | === Important threads === | ||