Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Inter process semaphore

Reply
Thread Tools

Inter process semaphore

 
 
stonkajr@gmail.com
Guest
Posts: n/a
 
      02-11-2007
Hi!
Is there a way in ruby to use global system's semaphore? I am using
Linux and AFAIK in C you can have many programs using the same
semaphore, but I do not know how to do this in Ruby .
Best Regards,
Roman Kamyk

 
Reply With Quote
 
 
 
 
Kashia Buch
Guest
Posts: n/a
 
      02-11-2007
Hi,

> Is there a way in ruby to use global system's semaphore? I am using
> Linux and AFAIK in C you can have many programs using the same
> semaphore, but I do not know how to do this in Ruby .


Simple C ext + normal semaphores? AFAIK when calling a C ext, Ruby
blocks until it's finished. Using that behaviour, you can write
a C function which waits/blocks on a semaphore. Keep in mind that
the whole Ruby process will be blocked since Ruby only has green
threads.

K

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inter process semaphore stonkajr@gmail.com Ruby 1 02-11-2007 03:19 PM
Help Needed : Race condition while removing semaphore(sysvsem semaphore) techi_C C Programming 2 08-10-2006 12:27 PM
Re: Sockets for inter-process communication Sudsy Java 0 06-28-2003 04:24 AM
Re: Sockets for inter-process communication Jon A. Cruz Java 0 06-28-2003 03:33 AM
Re: Sockets for inter-process communication Knute Johnson Java 0 06-27-2003 10:00 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57