Re: Non blocking spin lock..
- From: "cwarwick" <warwick@xxxxxxx>
- Date: Thu, 26 Apr 2007 19:32:27 +0100
"Chris Thomasson" <cristom@xxxxxxxxxxx> wrote in message
news:m8adnUiN9Jiwsa3bnZ2dnUVZ_gKdnZ2d@xxxxxxxxxxxxxx
"David Schwartz" <davids@xxxxxxxxxxxxx> wrote in message
news:1177394029.411699.91440@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Apr 23, 6:59 am, "cwarwick" <warw...@xxxxxxx> wrote:
My apologies if this post appears twice. My first post didn't appear,
and I didn't keep a copy of it. So this is the same information
presented differently.
Anyway here's my lock object.. (just the implementation.)
It takes years of experience to write correct multi-threading
synchronization primitives. You've basically made every mistake.
That's fine if you're learning, but do not deploy this code.
Heck! I did not know that this was an x86 assembly language question!
;^)
AFAICT, his trylock scheme should work... Also, to the OP:
Why not just use pthread_mutex_trylock?
Well im using Delphi so i dont think it has PThreads, also all i know next
to nothing about them. The most i've done before now is to use an occasional
background thread chrunching some numbers while the main thread shows a
progress bar or graph or somthing. In which case i just paused the
background thread while i accessed the data.
--
Posted via a free Usenet account from http://www.teranews.com
.
- References:
- Non blocking spin lock..
- From: cwarwick
- Re: Non blocking spin lock..
- From: David Schwartz
- Re: Non blocking spin lock..
- From: Chris Thomasson
- Non blocking spin lock..
- Prev by Date: Re: Non blocking spin lock..
- Next by Date: Re: Non blocking spin lock..
- Previous by thread: Re: Non blocking spin lock..
- Next by thread: Re: Non blocking spin lock..
- Index(es):
Relevant Pages
|
|