Ask a Question related to Ruby, Design and Development.
-
Thomas Sondergaard #1
Ruby interpreter thread safety
I have a scenario where a ruby extension module starts real/os/heavy-weight
threads that may call back to ruby. As far as I understand the ruby
interpreter itself is not thread safe. How can I handle this thread-safety
problem?
Cheers,
Thomas
Thomas Sondergaard Guest
-
Thread safety/synchronization?
Flex/AS doesn't appear to have any overt synchronization mechanism, is it handled under the covers (ie is every method synchronized?) or is it user... -
apartmant thread safety
I'm rather confused about this whole threading business of IIS, ASP and COM components. We have an apartment threaded component with a function... -
Trying to figure out thread safety
(Having been told of a solution to one problem (File::CREAT was indeed what was needed), I'll now go off on something entirely different.) I've... -
Thread safety: Serializing access to ruby interpreter- again
I recently asked about this and got answers, but here I go again: How can I efficiently serialize access to the ruby interpreter. I have to make... -
Thread safety of vm_copy
I tried looking around for explicit documentation on this but to no avail, perhaps it is too basic. On Mac OS X the Mach function vm_copy has a... -
nobu.nokada@softhome.net #2
Re: Ruby interpreter thread safety
Hi,
At Thu, 4 Sep 2003 19:45:24 +0900,
Thomas Sondergaard wrote:Run the ruby interpreter in a particular os-thread, and use> I have a scenario where a ruby extension module starts real/os/heavy-weight
> threads that may call back to ruby. As far as I understand the ruby
> interpreter itself is not thread safe. How can I handle this thread-safety
> problem?
system provided queue.
--
Nobu Nakada
nobu.nokada@softhome.net Guest
-
Jim Weirich #3
Re: Ruby interpreter thread safety
On Thu, 2003-09-04 at 06:45, Thomas Sondergaard wrote:
The general solution for any threaded code making calls to a non-thread> I have a scenario where a ruby extension module starts real/os/heavy-weight
> threads that may call back to ruby. As far as I understand the ruby
> interpreter itself is not thread safe. How can I handle this thread-safety
> problem?
safe library is to do one of the following:
(a) Make calls into the library (callbacks in your case) from
only a single thread.
or (b) Serialize calls to the library by using a mutex of some type.
--
-- Jim Weirich [email]jweirich@one.net[/email] [url]http://onestepback.org[/url]
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
Jim Weirich Guest
-
Thomas Sondergaard #4
Re: Ruby interpreter thread safety
> The general solution for any threaded code making calls to a non-thread
Got it!> safe library is to do one of the following:
>
> (a) Make calls into the library (callbacks in your case) from
> only a single thread.
> or (b) Serialize calls to the library by using a mutex of some type.
Thomas
Thomas Sondergaard Guest
-
Thomas Sondergaard #5
Re: Ruby interpreter thread safety
Could you give me an example of such a system provided queue?> Run the ruby interpreter in a particular os-thread, and use
> system provided queue.
Cheers,
Thomas
Thomas Sondergaard Guest



Reply With Quote

