summaryrefslogtreecommitdiff
path: root/lib/python2.7/mutex.pyo
blob: ac1852c4b523c3183480a157797821bec3c9058c (plain)
ofshex dumpascii
0000 03 f3 0d 0a 2f 5c fc 55 63 00 00 00 00 00 00 00 00 04 00 00 00 40 00 00 00 73 50 00 00 00 64 00 ..../\.Uc............@...sP...d.
0020 00 5a 00 00 64 01 00 64 02 00 6c 01 00 6d 02 00 5a 02 00 01 65 02 00 64 03 00 64 04 00 64 05 00 .Z..d..d..l..m..Z...e..d..d..d..
0040 83 01 01 01 5b 02 00 64 01 00 64 06 00 6c 03 00 6d 04 00 5a 04 00 01 64 07 00 64 0a 00 64 08 00 ....[..d..d..l..m..Z...d..d..d..
0060 84 00 00 83 00 00 59 5a 05 00 64 09 00 53 28 0b 00 00 00 73 4a 02 00 00 4d 75 74 75 61 6c 20 65 ......YZ..d..S(....sJ...Mutual.e
0080 78 63 6c 75 73 69 6f 6e 20 2d 2d 20 66 6f 72 20 75 73 65 20 77 69 74 68 20 6d 6f 64 75 6c 65 20 xclusion.--.for.use.with.module.
00a0 73 63 68 65 64 0a 0a 41 20 6d 75 74 65 78 20 68 61 73 20 74 77 6f 20 70 69 65 63 65 73 20 6f 66 sched..A.mutex.has.two.pieces.of
00c0 20 73 74 61 74 65 20 2d 2d 20 61 20 27 6c 6f 63 6b 65 64 27 20 62 69 74 20 61 6e 64 20 61 20 71 .state.--.a.'locked'.bit.and.a.q
00e0 75 65 75 65 2e 0a 57 68 65 6e 20 74 68 65 20 6d 75 74 65 78 20 69 73 20 6e 6f 74 20 6c 6f 63 6b ueue..When.the.mutex.is.not.lock
0100 65 64 2c 20 74 68 65 20 71 75 65 75 65 20 69 73 20 65 6d 70 74 79 2e 0a 4f 74 68 65 72 77 69 73 ed,.the.queue.is.empty..Otherwis
0120 65 2c 20 74 68 65 20 71 75 65 75 65 20 63 6f 6e 74 61 69 6e 73 20 30 20 6f 72 20 6d 6f 72 65 20 e,.the.queue.contains.0.or.more.
0140 28 66 75 6e 63 74 69 6f 6e 2c 20 61 72 67 75 6d 65 6e 74 29 20 70 61 69 72 73 0a 72 65 70 72 65 (function,.argument).pairs.repre
0160 73 65 6e 74 69 6e 67 20 66 75 6e 63 74 69 6f 6e 73 20 28 6f 72 20 6d 65 74 68 6f 64 73 29 20 77 senting.functions.(or.methods).w
0180 61 69 74 69 6e 67 20 74 6f 20 61 63 71 75 69 72 65 20 74 68 65 20 6c 6f 63 6b 2e 0a 57 68 65 6e aiting.to.acquire.the.lock..When
01a0 20 74 68 65 20 6d 75 74 65 78 20 69 73 20 75 6e 6c 6f 63 6b 65 64 20 77 68 69 6c 65 20 74 68 65 .the.mutex.is.unlocked.while.the
01c0 20 71 75 65 75 65 20 69 73 20 6e 6f 74 20 65 6d 70 74 79 2c 0a 74 68 65 20 66 69 72 73 74 20 71 .queue.is.not.empty,.the.first.q
01e0 75 65 75 65 20 65 6e 74 72 79 20 69 73 20 72 65 6d 6f 76 65 64 20 61 6e 64 20 69 74 73 20 66 75 ueue.entry.is.removed.and.its.fu
0200 6e 63 74 69 6f 6e 28 61 72 67 75 6d 65 6e 74 29 20 70 61 69 72 20 63 61 6c 6c 65 64 2c 0a 69 6d nction(argument).pair.called,.im
0220 70 6c 79 69 6e 67 20 69 74 20 6e 6f 77 20 68 61 73 20 74 68 65 20 6c 6f 63 6b 2e 0a 0a 4f 66 20 plying.it.now.has.the.lock...Of.
0240 63 6f 75 72 73 65 2c 20 6e 6f 20 6d 75 6c 74 69 2d 74 68 72 65 61 64 69 6e 67 20 69 73 20 69 6d course,.no.multi-threading.is.im
0260 70 6c 69 65 64 20 2d 2d 20 68 65 6e 63 65 20 74 68 65 20 66 75 6e 6e 79 20 69 6e 74 65 72 66 61 plied.--.hence.the.funny.interfa
0280 63 65 0a 66 6f 72 20 6c 6f 63 6b 2c 20 77 68 65 72 65 20 61 20 66 75 6e 63 74 69 6f 6e 20 69 73 ce.for.lock,.where.a.function.is
02a0 20 63 61 6c 6c 65 64 20 6f 6e 63 65 20 74 68 65 20 6c 6f 63 6b 20 69 73 20 61 71 75 69 72 65 64 .called.once.the.lock.is.aquired
02c0 2e 0a 69 ff ff ff ff 28 01 00 00 00 74 08 00 00 00 77 61 72 6e 70 79 33 6b 73 2f 00 00 00 74 68 ..i....(....t....warnpy3ks/...th
02e0 65 20 6d 75 74 65 78 20 6d 6f 64 75 6c 65 20 68 61 73 20 62 65 65 6e 20 72 65 6d 6f 76 65 64 20 e.mutex.module.has.been.removed.
0300 69 6e 20 50 79 74 68 6f 6e 20 33 2e 30 74 0a 00 00 00 73 74 61 63 6b 6c 65 76 65 6c 69 02 00 00 in.Python.3.0t....stackleveli...
0320 00 28 01 00 00 00 74 05 00 00 00 64 65 71 75 65 74 05 00 00 00 6d 75 74 65 78 63 00 00 00 00 00 .(....t....dequet....mutexc.....
0340 00 00 00 01 00 00 00 42 00 00 00 73 35 00 00 00 65 00 00 5a 01 00 64 00 00 84 00 00 5a 02 00 64 .......B...s5...e..Z..d.....Z..d
0360 01 00 84 00 00 5a 03 00 64 02 00 84 00 00 5a 04 00 64 03 00 84 00 00 5a 05 00 64 04 00 84 00 00 .....Z..d.....Z..d.....Z..d.....
0380 5a 06 00 52 53 28 05 00 00 00 63 01 00 00 00 01 00 00 00 02 00 00 00 43 00 00 00 73 19 00 00 00 Z..RS(....c............C...s....
03a0 74 00 00 7c 00 00 5f 01 00 74 02 00 83 00 00 7c 00 00 5f 03 00 64 01 00 53 28 02 00 00 00 73 29 t..|.._..t.....|.._..d..S(....s)
03c0 00 00 00 43 72 65 61 74 65 20 61 20 6e 65 77 20 6d 75 74 65 78 20 2d 2d 20 69 6e 69 74 69 61 6c ...Create.a.new.mutex.--.initial
03e0 6c 79 20 75 6e 6c 6f 63 6b 65 64 2e 4e 28 04 00 00 00 74 05 00 00 00 46 61 6c 73 65 74 06 00 00 ly.unlocked.N(....t....Falset...
0400 00 6c 6f 63 6b 65 64 52 02 00 00 00 74 05 00 00 00 71 75 65 75 65 28 01 00 00 00 74 04 00 00 00 .lockedR....t....queue(....t....
0420 73 65 6c 66 28 00 00 00 00 28 00 00 00 00 73 4c 00 00 00 2f 62 75 69 6c 64 62 6f 74 2f 74 6d 70 self(....(....sL.../buildbot/tmp
0440 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 72 65 62 75 69 6c 74 2f 6c 69 6e 75 /buildhost/install/prebuilt/linu
0460 78 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 2e 37 2f 6d 75 74 65 78 2e 70 79 74 x-x86_64/lib/python2.7/mutex.pyt
0480 08 00 00 00 5f 5f 69 6e 69 74 5f 5f 15 00 00 00 73 04 00 00 00 00 02 09 01 63 01 00 00 00 01 00 ....__init__....s........c......
04a0 00 00 01 00 00 00 43 00 00 00 73 07 00 00 00 7c 00 00 6a 00 00 53 28 01 00 00 00 73 21 00 00 00 ......C...s....|..j..S(....s!...
04c0 54 65 73 74 20 74 68 65 20 6c 6f 63 6b 65 64 20 62 69 74 20 6f 66 20 74 68 65 20 6d 75 74 65 78 Test.the.locked.bit.of.the.mutex
04e0 2e 28 01 00 00 00 52 05 00 00 00 28 01 00 00 00 52 07 00 00 00 28 00 00 00 00 28 00 00 00 00 73 .(....R....(....R....(....(....s
0500 4c 00 00 00 2f 62 75 69 6c 64 62 6f 74 2f 74 6d 70 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 L.../buildbot/tmp/buildhost/inst
0520 61 6c 6c 2f 70 72 65 62 75 69 6c 74 2f 6c 69 6e 75 78 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 all/prebuilt/linux-x86_64/lib/py
0540 74 68 6f 6e 32 2e 37 2f 6d 75 74 65 78 2e 70 79 74 04 00 00 00 74 65 73 74 1a 00 00 00 73 02 00 thon2.7/mutex.pyt....test....s..
0560 00 00 00 02 63 01 00 00 00 01 00 00 00 02 00 00 00 43 00 00 00 73 1e 00 00 00 7c 00 00 6a 00 00 ....c............C...s....|..j..
0580 73 16 00 74 01 00 7c 00 00 5f 00 00 74 01 00 53 74 02 00 53 64 01 00 53 28 02 00 00 00 73 5b 00 s..t..|.._..t..St..Sd..S(....s[.
05a0 00 00 41 74 6f 6d 69 63 20 74 65 73 74 2d 61 6e 64 2d 73 65 74 20 2d 2d 20 67 72 61 62 20 74 68 ..Atomic.test-and-set.--.grab.th
05c0 65 20 6c 6f 63 6b 20 69 66 20 69 74 20 69 73 20 6e 6f 74 20 73 65 74 2c 0a 20 20 20 20 20 20 20 e.lock.if.it.is.not.set,........
05e0 20 72 65 74 75 72 6e 20 54 72 75 65 20 69 66 20 69 74 20 73 75 63 63 65 65 64 65 64 2e 4e 28 03 .return.True.if.it.succeeded.N(.
0600 00 00 00 52 05 00 00 00 74 04 00 00 00 54 72 75 65 52 04 00 00 00 28 01 00 00 00 52 07 00 00 00 ...R....t....TrueR....(....R....
0620 28 00 00 00 00 28 00 00 00 00 73 4c 00 00 00 2f 62 75 69 6c 64 62 6f 74 2f 74 6d 70 2f 62 75 69 (....(....sL.../buildbot/tmp/bui
0640 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 72 65 62 75 69 6c 74 2f 6c 69 6e 75 78 2d 78 38 ldhost/install/prebuilt/linux-x8
0660 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 2e 37 2f 6d 75 74 65 78 2e 70 79 74 0a 00 00 00 6_64/lib/python2.7/mutex.pyt....
0680 74 65 73 74 61 6e 64 73 65 74 1e 00 00 00 73 08 00 00 00 00 03 09 01 09 01 04 02 63 03 00 00 00 testandset....s............c....
06a0 03 00 00 00 03 00 00 00 43 00 00 00 73 33 00 00 00 7c 00 00 6a 00 00 83 00 00 72 19 00 7c 01 00 ........C...s3...|..j.....r..|..
06c0 7c 02 00 83 01 00 01 6e 16 00 7c 00 00 6a 01 00 6a 02 00 7c 01 00 7c 02 00 66 02 00 83 01 00 01 |......n..|..j..j..|..|..f......
06e0 64 01 00 53 28 02 00 00 00 73 a6 00 00 00 4c 6f 63 6b 20 61 20 6d 75 74 65 78 2c 20 63 61 6c 6c d..S(....s....Lock.a.mutex,.call
0700 20 74 68 65 20 66 75 6e 63 74 69 6f 6e 20 77 69 74 68 20 73 75 70 70 6c 69 65 64 20 61 72 67 75 .the.function.with.supplied.argu
0720 6d 65 6e 74 0a 20 20 20 20 20 20 20 20 77 68 65 6e 20 69 74 20 69 73 20 61 63 71 75 69 72 65 64 ment.........when.it.is.acquired
0740 2e 20 20 49 66 20 74 68 65 20 6d 75 74 65 78 20 69 73 20 61 6c 72 65 61 64 79 20 6c 6f 63 6b 65 ...If.the.mutex.is.already.locke
0760 64 2c 20 70 6c 61 63 65 0a 20 20 20 20 20 20 20 20 66 75 6e 63 74 69 6f 6e 20 61 6e 64 20 61 72 d,.place.........function.and.ar
0780 67 75 6d 65 6e 74 20 69 6e 20 74 68 65 20 71 75 65 75 65 2e 4e 28 03 00 00 00 52 0b 00 00 00 52 gument.in.the.queue.N(....R....R
07a0 06 00 00 00 74 06 00 00 00 61 70 70 65 6e 64 28 03 00 00 00 52 07 00 00 00 74 08 00 00 00 66 75 ....t....append(....R....t....fu
07c0 6e 63 74 69 6f 6e 74 08 00 00 00 61 72 67 75 6d 65 6e 74 28 00 00 00 00 28 00 00 00 00 73 4c 00 nctiont....argument(....(....sL.
07e0 00 00 2f 62 75 69 6c 64 62 6f 74 2f 74 6d 70 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c ../buildbot/tmp/buildhost/instal
0800 6c 2f 70 72 65 62 75 69 6c 74 2f 6c 69 6e 75 78 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 l/prebuilt/linux-x86_64/lib/pyth
0820 6f 6e 32 2e 37 2f 6d 75 74 65 78 2e 70 79 74 04 00 00 00 6c 6f 63 6b 27 00 00 00 73 06 00 00 00 on2.7/mutex.pyt....lock'...s....
0840 00 04 0c 01 0d 02 63 01 00 00 00 03 00 00 00 02 00 00 00 43 00 00 00 73 38 00 00 00 7c 00 00 6a ......c............C...s8...|..j
0860 00 00 72 2b 00 7c 00 00 6a 00 00 6a 01 00 83 00 00 5c 02 00 7d 01 00 7d 02 00 7c 01 00 7c 02 00 ..r+.|..j..j.....\..}..}..|..|..
0880 83 01 00 01 6e 09 00 74 02 00 7c 00 00 5f 03 00 64 01 00 53 28 02 00 00 00 73 5d 00 00 00 55 6e ....n..t..|.._..d..S(....s]...Un
08a0 6c 6f 63 6b 20 61 20 6d 75 74 65 78 2e 20 20 49 66 20 74 68 65 20 71 75 65 75 65 20 69 73 20 6e lock.a.mutex...If.the.queue.is.n
08c0 6f 74 20 65 6d 70 74 79 2c 20 63 61 6c 6c 20 74 68 65 20 6e 65 78 74 0a 20 20 20 20 20 20 20 20 ot.empty,.call.the.next.........
08e0 66 75 6e 63 74 69 6f 6e 20 77 69 74 68 20 69 74 73 20 61 72 67 75 6d 65 6e 74 2e 4e 28 04 00 00 function.with.its.argument.N(...
0900 00 52 06 00 00 00 74 07 00 00 00 70 6f 70 6c 65 66 74 52 04 00 00 00 52 05 00 00 00 28 03 00 00 .R....t....popleftR....R....(...
0920 00 52 07 00 00 00 52 0d 00 00 00 52 0e 00 00 00 28 00 00 00 00 28 00 00 00 00 73 4c 00 00 00 2f .R....R....R....(....(....sL.../
0940 62 75 69 6c 64 62 6f 74 2f 74 6d 70 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 buildbot/tmp/buildhost/install/p
0960 72 65 62 75 69 6c 74 2f 6c 69 6e 75 78 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 rebuilt/linux-x86_64/lib/python2
0980 2e 37 2f 6d 75 74 65 78 2e 70 79 74 06 00 00 00 75 6e 6c 6f 63 6b 30 00 00 00 73 08 00 00 00 00 .7/mutex.pyt....unlock0...s.....
09a0 03 09 01 15 01 0d 02 28 07 00 00 00 74 08 00 00 00 5f 5f 6e 61 6d 65 5f 5f 74 0a 00 00 00 5f 5f .......(....t....__name__t....__
09c0 6d 6f 64 75 6c 65 5f 5f 52 08 00 00 00 52 09 00 00 00 52 0b 00 00 00 52 0f 00 00 00 52 11 00 00 module__R....R....R....R....R...
09e0 00 28 00 00 00 00 28 00 00 00 00 28 00 00 00 00 73 4c 00 00 00 2f 62 75 69 6c 64 62 6f 74 2f 74 .(....(....(....sL.../buildbot/t
0a00 6d 70 2f 62 75 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 72 65 62 75 69 6c 74 2f 6c 69 mp/buildhost/install/prebuilt/li
0a20 6e 75 78 2d 78 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 2e 37 2f 6d 75 74 65 78 2e 70 nux-x86_64/lib/python2.7/mutex.p
0a40 79 52 03 00 00 00 14 00 00 00 73 0a 00 00 00 06 01 09 05 09 04 09 09 09 09 4e 28 00 00 00 00 28 yR........s..............N(....(
0a60 06 00 00 00 74 07 00 00 00 5f 5f 64 6f 63 5f 5f 74 08 00 00 00 77 61 72 6e 69 6e 67 73 52 00 00 ....t....__doc__t....warningsR..
0a80 00 00 74 0b 00 00 00 63 6f 6c 6c 65 63 74 69 6f 6e 73 52 02 00 00 00 52 03 00 00 00 28 00 00 00 ..t....collectionsR....R....(...
0aa0 00 28 00 00 00 00 28 00 00 00 00 73 4c 00 00 00 2f 62 75 69 6c 64 62 6f 74 2f 74 6d 70 2f 62 75 .(....(....sL.../buildbot/tmp/bu
0ac0 69 6c 64 68 6f 73 74 2f 69 6e 73 74 61 6c 6c 2f 70 72 65 62 75 69 6c 74 2f 6c 69 6e 75 78 2d 78 ildhost/install/prebuilt/linux-x
0ae0 38 36 5f 36 34 2f 6c 69 62 2f 70 79 74 68 6f 6e 32 2e 37 2f 6d 75 74 65 78 2e 70 79 74 08 00 00 86_64/lib/python2.7/mutex.pyt...
0b00 00 3c 6d 6f 64 75 6c 65 3e 0d 00 00 00 73 0a 00 00 00 06 01 10 01 10 01 03 02 10 02 .<module>....s..............