| | Clarification of access control
|
|
I'm curently reading Extreme Mindstorms. In listing 4.2 (see below) the seek task acquires the user defined resource and then enters an inner infinite loop looking for a target. It appears to me that if the seek task losing ownership of the user (...) (24 years ago, 16-Nov-00, to lugnet.robotics)
|
|
| | Re: Clarification of access control
|
|
If a task loses its resources (due to an equal or higher priority task acquiring them), then control leaves the body of the acquire statement. If there is a "catch" block following the acquire, then the catch block is executed, otherwise control (...) (24 years ago, 16-Nov-00, to lugnet.robotics)
|
|
| | Re: Clarification of access control
|
|
(...) I forgot to show that resources get released, the functionality is more like this: try { grabResource(X); ...body... releaseResource(X); } catch (ResourceLostException e) { } Dave (24 years ago, 17-Nov-00, to lugnet.robotics)
|