Hi, all:
I want to test the ansyc socket through xpcshell, so I set up a
eventLoop waiting for ansyc read, but I didn't find any method  to
break the event loop after process. Every time I want exit the test
procedure, I had to kill the process and losed all output. I have try
the destroyThreadEventQueue method, event try to interrupt current
thread but it seen nothing happen, who can tell me how to interrupt
the event loop?  thanks.

I set up the the event loop through these procedure:

var _eqs = Components.classes["@mozilla.org/event-queue-service;
1"].getService(nsIEventQueueService);
        _eqs.createMonitoredThreadEventQueue();
        var queue =
_eqs.getSpecialEventQueue(_eqs.CURRENT_THREAD_EVENT_QUEUE);

//do socket init and write some data

queue.eventLoop();

_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to