Lock

fml 8 tutorial
Prev |  | Next

# Chapter 46. Lock

Synchronization among processes uses lock. fml8 provides flock(2) or lockf(2) based lock mechanism.

# Overview: Lock

After 2003/03, fml8 provides more granular not giant lock.

Each resource defines each lock channel name.

For example, Mail::Delivery related class accesses the member list. It needs several locks.

Mail::Delivery::SMTP needs lock of member list. FML::Send and FML::Process::Delivery locks member list access in callling Mail::Delivery::SMTP.

Instead Mail::Delivery::Queue just sees the mail queue. The function can access the queue concurrently, also. So this module does not need lock.

Generally speaking, modules using maps require lock. For example, FML/Command/UserControl.pm and FML/Command/Auth.pm needs write lock, but FML/Credential.pm needs only read lock.

It is useful if fml8 provides reader writer lock. But it is not implemented. Currently we attension we use short critical region.

Prev | Home | Next
Discussion | Up | TODO

fml 8.0 (fml-devel) project homepage is www.fml.org/software/fml8/.
fml 4.0 project homepage is www.fml.org/software/fml4/.
about one floppy bsd routers, see www.bsdrouter.org/.
other free softwares are found at www.fml.org/software/.

author's homepage is www.fml.org/home/fukachan/.
Also, visit nuinui's world :) at www.nuinui.net.

For questions about FML, e-mail <fml-bugs@fml.org>.