È possibile eliminare gli errori ThreadSafe per ScriptingAdditions senza eliminare i file di aggiunta?

1

Ho i seguenti errori nel mio log di sistema durante l'esecuzione di es. Pagine:

Aug  4 19:06:50 Pages[9751]: Performance: Please update this scripting addition to supply a value for ThreadSafe for each event handler: "/Library/ScriptingAdditions/MySpeed.osax"
Aug  4 19:06:50 Pages[9751]: Performance: Please update this scripting addition to supply a value for ThreadSafe for each event handler: "/Library/ScriptingAdditions/SIMBL.osax"

Qual è la causa di ciò e come posso risolverlo?

    
posta kenorb 04.08.2013 - 20:10
fonte

1 risposta

1

Come soluzione alternativa, il gestore InjectEventHandler può essere rimosso o commentato da Info.plist dai file:

/Library/ScriptingAdditions/SIMBL.osax/Contents/Info.plist
/Library/ScriptingAdditions/MySpeed.osax/Contents/Info.plist

Fonte: link

Nell'esempio:

--- a/Info.plist
+++ b/Info.plist
@@ -37,8 +37,6 @@
                <key>Context</key>
                <string>Process</string>
            </dict>
-           <key>SIMeleop</key>
-           <string>InjectEventHandler</string>
        </dict>
    </dict>
 </dict>

Oppure puoi anche provare a impostare ThreadSafe su true: Per es.

<key>OSAXHandlers</key>
<dict>
    <key>Events</key>
    <dict>
        <key>sysodlog</key>
        <dict>
            <key>Handler</key>
            <string>DisplayDialogEventHandler</string>
            <key>ThreadSafe</key>
            <true/>
            <key>Context</key>
            <string>Process</string>
        </dict> 
...

Handler dictionary keys:

ThreadSafe - A boolean; is the handler thread-safe? (Event handlers only.)

ThreadSafe OSA and AppleScript in Mac OS X v10.6 are thread-safe. If a script is executed on a background thread and invokes an event handler that is not thread-safe, it will be called on the main thread, which is slower than directly invoking it on the calling thread and may reduce application responsiveness to user input. Ideally, all handlers should be thread-safe. Some inherently cannot be; for example, almost anything that displays UI must be executed on the main thread. You are encouraged to either verify that your event handlers are thread-safe or update them to make them thread-safe.

If the value of this key is true, then the handler may be executed on a non-main thread and it may be executed concurrently from multiple threads. If false, it will only be executed on the main thread. This key is required for event handlers, and must not be present for coercion handlers, which are required to be thread-safe. If a coercion handler cannot be made safe to run on background threads, the handler must arrange to execute the coercion on the main thread, such as using by using libdispatch and the main dispatch queue.

Ulteriori informazioni: link

Problemi correlati:

link link

Altro:

link link link link

    
risposta data 04.08.2013 - 20:18
fonte

Leggi altre domande sui tag