in reply to Re^3: Thread::RWLock for 5.8 threads ?
in thread Thread::RWLock for 5.8 threads ?

Yep thats what I've come up with, tho I'm trying to write it as an abstract class that Thread::Queue::Queueable objects derive from. And then I need to figure out where/how to CPAN it.

Replies are listed 'Best First'.
Re^5: Thread::RWLock for 5.8 threads ?
by BrowserUk (Patriarch) on Oct 24, 2005 at 17:51 UTC
    And then I need to figure out where/how to CPAN it.

    Yep. And there lies another minefield.

    You'll see that I chose to use threads::RWLock as a working title.

    That would get frowned upon by the "powers that be", because it has a all-lower first element to the name, but quite frankly, continuing to stick threads-related modules in the Thread::* namespace just invites further and continued confusion over what works with what and why. Like Perl's threads need another barrier to use.

    But then I guess the "powers-that-be" that makes these stupid decisions are probably all hardcore 'we don't need no stinkin' threads'-people anyway.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Yeah, namespace is an issue. In the interest of GOWI, I'll probably bury it inside the Thread::Queue::Duplex bundle. Tho maybe "Thread::Resource::ReadWrite" might be a good namespace, so anything else related to sharing resources among threads has a root. I'm already considering an alternate locking algorithm that permits upgrading read to write locks, or downgrading writes to reads; as currently implemented, T::RWLock requires a reader to unlock before it could get a write lock.