d3ru / eggbotcode

Automatically exported from code.google.com/p/eggbotcode
0 stars 0 forks source link

Provide device locking on POSIX plotforms #25

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Goal: allow concurrent use of multiple Eggbot devices connected to the same 
computer.

This works already on Windows.  On Windows, device handles by default are 
exclusive.  If one process has opened a device handle to an Eggbot, then as 
long as that handle is opened, no other process can open a device handle to the 
same Eggbot.  Other processes will skip that device in their search for an 
available Eggbot device.

On POSIX platforms, file descriptors are not exclusive.  Two processes can 
concurrently open a file descriptor to the same device and send commands to 
that device.  That's not desirable.

The proposal is to use POSIX advisory locks and have eggbot.py honor these 
locks.  This will then give the same behavior as on Windows.

Original issue reported on code.google.com by newman.d...@gmail.com on 8 Oct 2010 at 2:14

GoogleCodeExporter commented 9 years ago
Note that the code for this is written.  Will checkin in a week or so once 
current release activity has subsided a tad.

Original comment by newman.d...@gmail.com on 8 Oct 2010 at 2:15

GoogleCodeExporter commented 9 years ago
Would be nice; not going to currently act on this one.

Original comment by windell@oskay.net on 15 Dec 2014 at 9:53