Often times you’re tasked with solving a problem you haven’t faced before, requiring the use of technologies you haven’t previously been exposed to. This is a great thing! These experiences are the stuff of legend – continuing deep into the night as your curiosity peaks. When delivery of the solution makes a difference to somebody’s [...]
04 Mar
by: Matt in Development, Python
tags: multiprocessing, Python
Python’s multiprocessing module is a great tool that abstracts the details of forking and managing child processes in an interface inspired by the threading module. The benefit to using processes over threads is that you effectively avoid the issues of the GIL (Global Interpreter Lock). I wanted to share my experience with sharing static data [...]
For one off scripts for a particular project: #!/usr/bin/env python from django.core.management import setup_environ from myapp import settings setup_environ(settings) # do some stuff
02 Mar
by: Matt in Development, PHP
tags: concurrency, fork, parallel, pcntl, pcntl_fork, pcntl_wait, php, process, thread, unix
I find it interesting and challenging to bend PHP in ways it probably shouldn’t be bent. Almost always I walk away pleasantly surprised at it’s ability to solve a variety of problems. Consider this example. Let’s say you want to take advantage of more than one core for a given process. Perhaps it performs many [...]
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.