Skip to main content

All Questions

4 votes
3 answers
1k views

Thread-safe "singleton" that destroys object when not used anymore

I'm working on some legacy code which uses the singleton pattern. The problem I have with the traditional singleton is that the instance lives until the program terminates. This is messing up the ...
Martin Konrad's user avatar
1 vote
1 answer
523 views

QuickSort - 3 pivot choosing methods via factory

I'm happy to hear thoughts and ideas on structure/performance/testing/whatever and multi-threading, which I haven't gotten into yet with Python. Latest code here. Assignment file and a few test files ...
ofer.sheffer's user avatar
8 votes
1 answer
196 views

Producer consumer that simulates the interaction of threads controlling a hardware device

I have a producer consumer that simulates the interaction of threads controlling a hardware device. I have 1 thread controlling the device, 1 thread reading, and 1 thread outputting. The read is ...
Mikhail's user avatar
  • 231