Perl 6 - the future is here, just unevenly distributed

IRC log for #rosettacode, 2011-06-06

| Channels | #rosettacode index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:31 FireFly left #rosettacode
00:49 kpreid left #rosettacode
01:25 trolzies is now known as realz
02:17 Rabuf[RCo] joined #rosettacode
02:31 kpreid joined #rosettacode
02:32 Rabuf[RCo] left #rosettacode
04:38 kpreid left #rosettacode
05:42 mwn3d_phone left #rosettacode
06:00 mwn3d_phone joined #rosettacode
08:18 MigoMipo joined #rosettacode
10:32 MigoMipo left #rosettacode
12:56 FireFly joined #rosettacode
13:03 mwn3d_phone left #rosettacode
13:25 mwn3d_phone joined #rosettacode
13:41 kpreid joined #rosettacode
13:44 BenBE left #rosettacode
14:57 mwn3d_phone left #rosettacode
15:00 dagnyscott left #rosettacode
15:02 mwn3d_phone joined #rosettacode
15:08 realz is now known as MrCelsius
15:10 dagnyscott joined #rosettacode
15:12 kpreid left #rosettacode
15:18 MrCelsius is now known as realz
15:53 mwn3d_phone1 joined #rosettacode
15:53 mwn3d_phone left #rosettacode
16:15 kpreid joined #rosettacode
16:28 eel joined #rosettacode
16:41 mwn3d_phone1 is now known as mwn3d_phone
16:50 realazthat_ joined #rosettacode
16:53 realz left #rosettacode
17:09 MigoMipo joined #rosettacode
17:32 realazthat_ is now known as realz
18:43 kpreid left #rosettacode
18:45 eel left #rosettacode
18:47 kpreid joined #rosettacode
18:47 eel joined #rosettacode
19:06 dagnyscott left #rosettacode
19:26 mwn3d_phone left #rosettacode
19:27 mwn3d_phone joined #rosettacode
19:29 dagnyscott joined #rosettacode
20:20 mikemol Question for the folks converscent in multithreaded programming.
20:20 mikemol Just verifying my understanding of the assumptions of R/W locks.
20:22 mikemol Let's say you have an RW lock object which provides reader lock, reader release, writer lock, writer release, and a means of atomically upgrading from a reader lock to a writer lock.
20:22 mikemol Now let's say you have two threads calling the same function.
20:23 mikemol This function takes a read lock, upgrades to a writer lock (hereby releasing its reader lock, but retaining a writer lock), and then releases its writer lock.
20:23 mikemol Let's say both threads reach the point where they have the reader lock.
20:24 mikemol My *expectation* is that the two threads will deadlock when they reach the point in the function which attempts to upgrade to a writer lock.
20:24 mikemol (Because the lock object would need to wait until all reader locks are released, and neither thread will release its reader lock.)
20:25 mikemol And neither thread can permit the other to continue, because doing so would violate the assumption that a holder of a lock object would be the sole mutator(or there is no mutation) for the protected object for as long as any lock is held.
20:26 mikemol Is this all correct?
20:29 realz left #rosettacode
21:00 dagnyscott left #rosettacode
21:14 mwn3d_phone mikemol: I'm no expert on different types of locks but I don't think a reader lock being active would prevent a thread from getting a writer lock on the same resource
21:14 mwn3d_phone So one of them would get the writer lock and the other would wait
21:45 Mathnerd314 joined #rosettacode
22:07 MigoMipo left #rosettacode
22:54 Mathnerd314 left #rosettacode
22:55 Mathnerd314_ joined #rosettacode
22:56 Mathnerd314_ is now known as Mathnerd314

| Channels | #rosettacode index | Today | | Search | Google Search | Plain-Text | summary