Not sure I understand what you are running into.But LAPI is just a series of commands that your program issues against a livelink server.On a usual livelink server there are perhaps 5 threads so if you look at my example here.
Lapi program trying to add a document using the following major steps.
Login session constructor which is what you think is the session.
Accessenterprise workspace,thread 1 gave you that
ListObjects thread 3 gave you that
CreateObject thread 4 did that
CreateVersion thread 2 did that.
The session object in your lapi programs memory gives each thread what it asks for like login session,dapi session,wapi session and uapi session and so on so that you do not have to initiate that agaan and again
So as you can see lapi is not executing your commands on a single blocking thread,so if you need some stuff to be pesistent then you need to write it to a file or database table.
Going by my above eg if the same lapi application is executed twice you should check some where like a semaphore to prevent the same application again.
In oscript there is a singleton call that you can design so that you can instruct livelink to execute only one instance of it,that too works only on the 5 threads that server .Things like the ObjectImporter checks if any other instance is running and gracefully exits.That is how thread safety is accomplished in oscript.
Since LAPI is just a bunch of oscript,you can write your own api and make it blocking as well.
Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
Certified OT Developer,Livelink ECM Champion 2008