Unloading external DLL library after 10 seconds in order to release file locks
Another, perhaps simpler, option is to locally copy the dll and load the copy. 

Then regularly check the original dll for an updated last modified time and then unload the copied dll, make a fresh copy and load the new copy.

Do keep in mind that when debugging a dll has a pdb file associated with it and loading the dll also locks the pdb. You can work around that by making the compiler emit the pdb with a different name each time.



However as is your implementation isn't thread safe. If the timer is about to trigger then action could still be running. Instead you will want to use a ReaderWriterLock, take a read lock when doing action() and a write lock when actually loading and unloading.

Lock.AcquireReaderLock(1000);
try{
    if (!IsLoaded)
    {
        LockCookie cookie = Lock.UpgradeToWriterLock(1000);
        try {
            //someone else may have gotten ahead in the queue
            if (!IsLoaded)
            {
                // ... loads pdf library ...
            }
        } finally {
            Lock.DowngradeFromWriterLock(cookie);
        }
    } 
    action();

} finally {
    Lock.ReleaseReaderLock();
}