WSDisableLinkLock()
This feature is not supported on the Wolfram Cloud.

void WSDisableLinkLock(WSLINK l)
disables thread safety for the WSTP connection specified by l.

DetailsDetails

  • WSDisableLinkLock() is declared in the WSTP header file wstp.h.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSEnvironmentParameter ep;
    MLENV env;
    MLINK link, loopbackLink;
    int error;
    
    ep = WSNewParameters(WSREVISION, WSAPIREVISION);
    if(ep == (WSEnvironmentParameter)0)
    { /* Unable to create new parameters object */ }

    WSSetThreadSafeLinksParameter(ep);

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

    WSReleaseParameters(ep);

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

    WSActivate(link);

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

    WSDisableLinkLock(loopbackLink);

    /* ... */

    WSClose(loopbackLink);
    WSClose(link);

    WSDeinitialize(env);

    return 0;
}