On 8/17/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
> this means 16 mailer threads (or 32, if two machines). but i only want
> one mailer thread running at a time. (to avoid sending duplicate emails
> during a race condition) but apache kills and restarts processes, so i
> can't just randoml
i guess i should have done a better job of explaining myself. :)
am using a very typical apache setup - yes w/ multiple processes.
picture this:
1 (or more) apache server, one (or more) physical machine.
- each spawns say 16 server processes
- each process contains one thread, named "mail
I'm not sure how you're deploying, but most people use multiple
processes rather than a single process. Given that, an in-process
mutex will do you no good.
If you really are single-process, Django does not have a built-in
mutex, but maybe you want:
http://docs.python.org/lib/module-mutex.html
no, not trying to farm out many threads. already have many threads
running. (from apache) and (obviously) there is no master thread to do
the coordination. see: http://en.wikipedia.org/wiki/Mutual_exclusion
just want to make sure no two threads are entering the same critical
section at the
I think you want gearmand:
http://www.danga.com/gearman/
It has a 'uniq' property that ensures only one job with a given name is running.
On 8/17/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>
> i have a number of background threads in my app, and for a few of them i
> want to make sure only on
e:
>> hey,
>>
>> how is everyone handling mutual exclusion between server threads in
>> django? is there a built-in method i'm missing?
>
> What are you trying to accomplish?
>
> >
>
--~--~-~--~~~---~--~~
You receiv
On 8/16/07, Derek Anderson <[EMAIL PROTECTED]> wrote:
>
> hey,
>
> how is everyone handling mutual exclusion between server threads in
> django? is there a built-in method i'm missing?
What are you trying to accomplish?
--~--~-~--~~~---~
hey,
how is everyone handling mutual exclusion between server threads in
django? is there a built-in method i'm missing?
derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
8 matches
Mail list logo