Browse by Tags

All Tags » threading (RSS)
Sorry, but there are no more tags available to filter with.

ทำงานหนักๆ โดยที่โปรแกรมไม่ค้าง ภาคสอง

Posted 15/06/2008 02:29
by nantcom

ภาคนี้ไม่มีอะไรมากครับ คือว่า ผมได้แนวดีๆ มาอีกแนวคือ มันจะมีอีกกรณีที่เราแค่ต้องการจะทำอะไรที่มันนานๆ แต่ว่าโปรแกรมเราก้อต้องหยุดรออยู่ดี แล้วเราก้อบอกไม่ได้เป็น Progress Bar เช่น ส่งข้อมูลไป Web Service ผมก้อเลยทดลองเล่นๆ และก็นำเอาเทคนิคของ DoEvents และ Anonymous Method ผสม Thread มายำรวมกัน ได้แบบนี้ครับ public delegate void Work (); /// <summary> /// Utility function to run the specified work without blocking the UI thread /// from processing event. This is not multi-threaded solution...

อ่านและเขียนคอมเมนต์... (มีแล้ว 3)
มีคนดูแล้ว 2,325 คน