There is a catch, though; if you have the same file open multiple times, even with different names, then closing one file descriptor will release all locks on that file in the same process, even in different threads.
SQLite goes to great lengths to work around this. See: http://www.google.com/search?q=broken+by+design+site:sqlite....