2009/11/12 David T. Lewis lewis@mail.msen.com:
On Wed, Nov 11, 2009 at 09:16:44PM +0200, Igor Stasenko wrote:
Instead, why not expose the new VM abilities to language, so one could tell that specified callout should use a specified thread. Something like:
threadHandle := Smalltalk currentThreadId.
It is not hard to make these things accessible in the image, for example:
OSProcess thisOSProcess pthread ==> a ByteArray(240 166 184 224 255 255 255 255)
(this on a 64-bit platform, hence the 8-byte handle)
its not really matters what object represents the thread handle (it could be simple smallint). And surely, its not that hard to expose some thread-aware API to language level, given that VM _is_ thread-aware. But by not exposing it, we losing another lever of control, using which we could write a sophisticated software, purely in smalltalk without getting down at C level. That's what i ment to say.
Dave