Name

global.CommunicationPlanMutexWrapper

Description

No description available

Script

var CommunicationPlanMutexWrapper = Class.create();
CommunicationPlanMutexWrapper.prototype = {
  initialize: function(taskId) {
  	this.mutexName = 'TCM' + taskId;
  	this.mutexMetricName = 'Communication plan mutex';
  	this.mutex = new SelfCleaningMutex(this.mutexName, this.mutexMetricName);
  },

  getLock: function() {
  	this.mutex.setSpinWait(500);
  	this.mutex.setMaxSpins(240);
  	this.mutex.setMutexExpires(120000); //120 seconds
  	return this.mutex.get();
  },

  releaseLock: function() {
  	this.mutex.release();
  },

  type: 'CommunicationPlanMutexWrapper'
};

Sys ID

a1e506265b301300e3cc8e6541f91a3f

Offical Documentation

Official Docs: