前兩天提過星期六晚去了參加 芝華士903友情夾gig音樂會 ,雖然今次的演出時間很小,只有大約一、兩分鐘,但感覺也很不錯。今次的曲目是〈小玩意〉,我們伴隨林海峰一起出唱,前半首以 A capella 形式唱出,後半 Band 加入。
如果
前兩天提過星期六晚去了參加 芝華士903友情夾gig音樂會 ,雖然今次的演出時間很小,只有大約一、兩分鐘,但感覺也很不錯。今次的曲目是〈小玩意〉,我們伴隨林海峰一起出唱,前半首以 A capella 形式唱出,後半 Band 加入。
如果
Because of the sometimes much-maligned Global Interpreter Lock, purePython code itself can't run simultaneously on multiple CPUs. So whatshould you use Python threads for?
The real use for Python threads is turning synchronous functions inextension modules into asynchronous things that don't delay your mainprogram. Often these functions have no asynchronous equivalents (unlikenetwork IO), so it is either use threads or have your main programdelayed. This works for sufficiently compute-intensive functions as wellas functions, like socket.
網頁開發
Yahoo! 收購 del.icioo.us
People doing lots of network IO in threaded programs have historicallyhad a problem: waiting for both network IO and for IPC from threads atthe same time.
Generally you want to wait for network IO using select() or poll() ; trying to use lots of threads, each doing one blocking IOoperation, is usually catastrophic to your performance. But both ofthese only wait on file descriptors, and inter-thread communication inlibraries is almost always implemented with mutexes, semaphores,queues, and so on,