static new ThreadLocal postSoftwareMadeWeb_disabled; static new BetterThreadLocal postSoftwareMadeWeb_websMadeInThread; static new ThreadLocal postSoftwareMadeWeb_maker; // L // function can also return false to stop triggerWebsChanged static L postSoftwareMadeWeb_onNewWeb = synchroList(); // L static L postSoftwareMadeWeb_onDisabledPost = synchroList(); static void postSoftwareMadeWeb(Web web, O... params) { lock aiLock(); web_intern(web); incIntThreadLocal(postSoftwareMadeWeb_websMadeInThread); S maker = postSoftwareMadeWeb_maker!; if (maker != null) if (empty(web.source)) web.source = maker; else params = paramsPlus(params, 'maker, postSoftwareMadeWeb_maker!); if (isTrue(postSoftwareMadeWeb_disabled!)) { print(" Would post: " + webToStringShort(web)); pcallFAll(postSoftwareMadeWeb_onDisabledPost, web); } else { logStructure(postSoftwareMadeWeb_file(), nu(SoftwareMadeWeb, date := now(), computerID := computerID(), programID := programID(), structure := struct(web), furtherInfo := empty(params) ? null : litorderedmap(params))); markWebsPosted_createMarker(); if (!pcallF_anyFalse(postSoftwareMadeWeb_onNewWeb, web)) triggerWebsChanged(); } } static File postSoftwareMadeWeb_file() { ret getProgramFile("webs-made.txt"); }