OpenersNotesSection(Spacer1)Details

MLDisableLinkLock() is declared in the MathLink header file (RefLink[mathlink.h, paclet:/ref/file/mathlink.h]).

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

#include "mathlink.h"

int main(int argc, char **argv)
{
	MLEnvironmentParameter ep;
	MLENV env;
	MLINK link, loopbackLink;
	int error;
	
	ep = MLNewParameters(MLREVISION, MLAPIREVISION);
	if(ep == (MLEnvironmentParameter)0)
	{ /* Unable to create new parameters object */ }

	MLSetThreadSafeLinksParameter(ep);

	env = MLInitialize(ep);
	if(env == (MLENV)0)
	{ /* Unable to create new environment object */ }

	MLReleaseParameters(ep);

	link = MLOpenArgcArgv(env, argc, argv, &error);
	if(link == (MLINK)0 || error != MLEOK)
	{ /* Cannot create link */ }

	MLActivate(link);

	loopbackLink = MLLoopbackOpen(env, &error);
	if(loopbackLink == (MENV)0 || error != MLEOK)
	{ /* Unable to create loopback link */ }

	MLDisableLinkLock(loopbackLink);

	/* ... */

	MLClose(loopbackLink);
	MLClose(link);

	MLDeinitialize(env);

	return 0;
}

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(NonWLLink[MLEnableLinkLock(), paclet:/ref/c/MLEnableLinkLock])  ▪  (NonWLLink[MLSetThreadSafeLinksParameter(), paclet:/ref/c/MLSetThreadSafeLinksParameter])}})}})