TAILIEUCHUNG - Lập trình .net 4.0 và visual studio 2010 part 17

Viết các ứng dụng song song và ren là khó khăn. Để giúp, Microsoft đã bổ sung thêm tính năng sửa lỗi cho Visual Studio IDE (phiên bản cao cấp bao gồm các tính năng bổ sung hồ sơ). Để chứng minh các tính năng này, chúng tôi sẽ tạo ra một ứng dụng đơn giản, giao diện điều khiển mới. | CHAPTER 5 PARALLELIZATION AND THREADING ENHANCEMENTS Scheduling on UI thread TaskScheduler supports the ability to schedule items on the UI thread saving you from writing some tedious marshalling code. For more info on this please refer to http pfxteam archive 2009 04 14 . Parallel Debugging Enhancements Writing parallel and threaded applications is hard. To help Microsoft has added additional debugging features to the Visual Studio IDE premium versions include additional profiling features . To demonstrate these features we will create a new simple console application. Create a new project called and enter the following code using static void Main string args Task taskl startAnotherTask Task task2 startAnotherTask Task task3 doSomething static void startAnotherTask Task task4 doSomethingElse static void doSomething 500000 static void doSomethingElse 500000 Put a breakpoint on the line that reads as follows Task task3 doSomething The first feature we will look at is the Parallel Task window. Parallel Task Window This window shows you all the tasks that are currently running and contains features for filtering and jumping directly to where the task is declared. Run the application in debug mode ensuring that you have added a breakpoint to the first line. When the breakpoint is hit on the main menu go to Debug Windows Parallel Tasks Ctrl Shift D K 111 CHAPTER 5 PARALLELIZATION AND THREADING ENHANCEMENTS and you will see a window like the one shown in Figure 5-5 that allows you to review the current status of all your tasks. Figure 5-5. Parallel Tasks debugging window The Parallel Tasks window offers the following functionality You can order the view by clicking the column headings. You can group tasks by status by .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.