BeatTakeshi@lemmy.world to Programmer Humor@lemmy.ml · 7 days agoWhen you run out of Claude tokenslemmy.mlimagemessage-square41linkfedilinkarrow-up11arrow-down10file-text
arrow-up11arrow-down1imageWhen you run out of Claude tokenslemmy.mlBeatTakeshi@lemmy.world to Programmer Humor@lemmy.ml · 7 days agomessage-square41linkfedilinkfile-text
minus-squareSonotsugipaa@lemmy.dbzer0.comlinkfedilinkEnglisharrow-up0·6 days agoTIL that thread safety is a thing in Python
minus-squareTrioxin@lemmygrad.mllinkfedilinkarrow-up0·6 days agoWell, yes… While the GIL restricts execution to only a single thread, CPython makes threads take turns on it without regard for your code - so a thread can give the lock up to another in the middle of a critical section.
TIL that thread safety is a thing in Python
Well, yes… While the GIL restricts execution to only a single thread, CPython makes threads take turns on it without regard for your code - so a thread can give the lock up to another in the middle of a critical section.