Snippets of the day – Wednesday, October 16, 2013

Posted on Posted in Snippets


Here are some of the most recently published snippets!

Lock and synchronization in python

This example shows how to deal with lock in python parallel programming.

Here we want to calculate the disk occupancy for a given directory in Linux OS, evaluating the disk occupancy for any subdirectory using threads.

Note the usage of lock mechanism to ensure atomic operation on the total sum.

Open the snippet

Author:    lbottaro


A toy example for the factory design pattern

Open the snippet

Author:    mprisznyak

Leave a Reply

Your email address will not be published. Required fields are marked *