All resources now share a common base class called BaseResource, which provides
generic methods to put and get items from the resource. This works with the old
Resource class too, which basically was a lock. Resource.request() is equal to
putting a token in the resource while Resource.release() just removes this
put() and get() accept arbitrary arguments which will be directly forwarded
into the respective event instances. This allows to specify for example custom
Generally, I like this idea and implementation. There are, however, a few minor glitches and organisational/formatting issues that I’d like to discuss with you next week. I’m also not sure why the API changes for the queues were necessary (e.g., renaming Queue.push() to Queue.append()).
Cool, the answer to the latter is easy. To simply use default python lists as queues. This is a performance improvement and reuses the existing Python list interface instead of redundantly creating a new one.