Where is the document for GlideMutex?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2016 05:19 AM
I need a lock in my script, but I was not able to find the document about this class. Where can i find it?
Thanks
- 6,304 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2016 05:27 AM
I don't see anything. I'll reach out to the developer portal people and let you know what I find.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2016 10:20 AM
Hi,
The reason GlideMutex is not documented is because the developers really don't want customers, partners, or PS using it.
Can you help me understand what you are trying to lock from your script and why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2016 10:34 AM
Thanks for the update.
We are trying to sync a large number of contacts/groups to our server. Due to the number of records that can be sent over to our server in one batch, I have to create a lot of batches, and because of the number of outbound HTTP requests is pretty small(100 for background transactions), I have to use GlideScriptedHierarchicalWorker, which based on some suggestions can get around this.
But, in order to limit the number of GlideScriptedHierarchicalWorker instances, I want to check how many workers are already there, and here comes in the need of a Mutex: When a thread is to check and increase the number of workers, I don't want other threads to do it.
Along the line, I also like to have the sleep() function. Basically that one a try to lock(mutex) fails, i want to sleep 5 seconds before next try.
However, right now both sleep() and GlideMutex are unavailable in scoped application, is there any chance you would make them available again for developers?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2016 10:37 AM
I have referred this thread to our integrations product team. Stay tuned...