4 Reusable Code Snippet Topics

Remove Filter
Member Avatar for
Member Avatar for james6754

Hi everyone this is my first code snippet so be gentle.. I have written a basic client/server chat program that uses multithreading for listening and sending. I welcome any improvements or discussion... Thanks James

Member Avatar for Arpit_1
2
12K
Member Avatar for vegaseat
Member Avatar for zinnqu

This is a great example for a thread stop. Simple debugging trick for any looped process that needs the "e-brake" applied while making sure that the thread is working correctly. The idea is that you can manually stop a thread, to prevent that hanging sensation during any process. This works …

0
2K
Member Avatar for Gribouillis

When several producer threads put items in a queue.Queue, and a consumer thread gets items from the queue, there is no way for the consumer thread to tell the producers that they should stop feeding the queue. This snippet defines a subclass of Queue with a close method. After the …

Member Avatar for Gribouillis
0
313

The End.