WSDisableLinkLock (C Function)

void WSDisableLinkLock( WSLINK l )

disables thread safety for the WSTP connection specified by l.

Details

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

Examples

Basic Examples  (1)

#include "wstp.h"

int main(int argc, char **argv)
{
    WSEnvironmentParameter ep;
    WSENV env;
    WSLINK 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 == (WSENV)0)
    { /* Unable to create new environment object */ }

    WSReleaseParameters(ep);

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

    WSActivate(link);

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

    WSDisableLinkLock(loopbackLink);

    /* ... */

    WSClose(loopbackLink);
    WSClose(link);

    WSDeinitialize(env);

    return 0;
}