Unique TIDs in OSX?
Unique TIDs in OSX?
- Subject: Unique TIDs in OSX?
- From: Paul Skinner <email@hidden>
- Date: Thu, 9 May 2002 10:39:43 -0400
After hearing Nige comment on the slow speed of the 'Tell TIDs'
block, I looked into the whole issue of storing and resetting the TIDs.
I thought...AppleScript isn't multithreaded, how necessary is this
anyway? If I have any piece of code that uses TIDs I always set them
just prior to using them. How likely is it that another app could reset
them while I'm using them? And if I am storing them so that I can reset
them for other processes to continue using them later then what about
while they're stored but set to a different value? What keeps script#2
from using the current value in the meanwhile? And what about script#2
storing them and changing them itself while script#1 is doing that too?
It just didn't add up. And so I set about finding out if I could cause a
train wreck.
Long story made short... I can't. Can anyone post code that
demonstrates a script that uses TIDs using the value of TIDs that has
been modified by another script while both are running? It appears to me
to be a non-issue. At least here.
OS version 10.1.4. Applescript verion 1.8.2b4
These two scripts saved as applications. Running simultaneously.
Switching between them using the dock.
--Script y.
repeat 100 times
set AppleScript's text item delimiters to "y"
display dialog "Script y's tids: " & AppleScript's text item delimiters
end repeat
--End script y.
--always returns...
-->Script y's tids: y
--Script z.
set AppleScript's text item delimiters to "z"
repeat 100 times
display dialog "Script z's tids: " & AppleScript's text item delimiters
end repeat
--End script z.
-- always returns...
-->Script z's tids: z
Now I would have expected script y to reset the TIDs to 'y' on every
loop and script z to reply 'Script z's tids: y'. But not here. Each
script appears to have it's own TIDs. Now I've used 'my text item
delimiters' before, but that's another thing.
--
Paul Skinner
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.