portalocker.constants module

Locking constants

Lock types:

  • LOCK_EX exclusive lock
  • LOCK_SH shared lock

Lock flags:

  • LOCK_NB non-blocking

Manually unlock, only needed internally

  • LOCK_UN unlock
portalocker.constants.LOCK_EX = 2

exclusive lock

portalocker.constants.LOCK_NB = 4

non-blocking

portalocker.constants.LOCK_SH = 1

shared lock

portalocker.constants.LOCK_UN = 8

unlock