[#1026] Is this a bug? — Dave Thomas <Dave@...>

18 messages 2000/01/03

[#1084] Infinite loop — Dave Thomas <Dave@...>

17 messages 2000/01/11

[#1104] The value of while... — Dave Thomas <Dave@...>

24 messages 2000/01/11

[ruby-talk:01209] Re: File#flock

From: matz@... (Yukihiro Matsumoto)
Date: 2000-01-31 14:44:43 UTC
List: ruby-talk #1209
Hi,

In message "[ruby-talk:01208] File#flock"
    on 00/01/31, ts <decoux@moulon.inra.fr> writes:

| The documentation say :
|
|  LOCK_EX 
|
|     Exclusive lock. Only one process may hold an exclusive lock for a
|                     ^^^^^^^^^^^^^^^^
|     given file at a given time.
|
| This is "Only one thread", no ?

No, File#flock is based on system call flock(2), which does not aware
of Ruby's threads.  For thread synchronization, use Mutex.

In This Thread