Changeset 164 for MicroThreading/Demo
- Timestamp:
- Feb 8, 2011, 11:05:30 AM (14 years ago)
- Location:
- MicroThreading/Demo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
MicroThreading/Demo/Demo.lpi
r162 r164 43 43 </Item3> 44 44 </RequiredPackages> 45 <Units Count=" 28">45 <Units Count="30"> 46 46 <Unit0> 47 47 <Filename Value="Demo.lpr"/> … … 59 59 <ResourceBaseClass Value="Form"/> 60 60 <UnitName Value="UMainForm"/> 61 <EditorIndex Value="6"/> 62 <WindowIndex Value="0"/> 63 <TopLine Value="372"/> 64 <CursorPos X="21" Y="378"/> 61 <IsVisibleTab Value="True"/> 62 <EditorIndex Value="9"/> 63 <WindowIndex Value="0"/> 64 <TopLine Value="332"/> 65 <CursorPos X="23" Y="342"/> 65 66 <UsageCount Value="270"/> 66 67 <Loaded Value="True"/> … … 70 71 <Filename Value="../UMicroThreading.pas"/> 71 72 <UnitName Value="UMicroThreading"/> 72 <IsVisibleTab Value="True"/>73 73 <EditorIndex Value="0"/> 74 74 <WindowIndex Value="0"/> 75 <TopLine Value="9 76"/>76 <CursorPos X="1 8" Y="986"/>75 <TopLine Value="986"/> 76 <CursorPos X="19" Y="1000"/> 77 77 <UsageCount Value="136"/> 78 78 <Loaded Value="True"/> … … 126 126 <Filename Value="../UPlatform.pas"/> 127 127 <UnitName Value="UPlatform"/> 128 <WindowIndex Value="0"/> 129 <TopLine Value="23"/> 130 <CursorPos X="31" Y="38"/> 128 <EditorIndex Value="3"/> 129 <WindowIndex Value="0"/> 130 <TopLine Value="25"/> 131 <CursorPos X="41" Y="39"/> 131 132 <UsageCount Value="37"/> 133 <Loaded Value="True"/> 132 134 </Unit9> 133 135 <Unit10> … … 136 138 <ResourceBaseClass Value="Form"/> 137 139 <UnitName Value="UMicroThreadList"/> 138 <EditorIndex Value=" 4"/>139 <WindowIndex Value="0"/> 140 <TopLine Value=" 83"/>141 <CursorPos X=" 84" Y="94"/>140 <EditorIndex Value="7"/> 141 <WindowIndex Value="0"/> 142 <TopLine Value="53"/> 143 <CursorPos X="61" Y="61"/> 142 144 <UsageCount Value="23"/> 143 145 <Loaded Value="True"/> … … 239 241 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/packages/fcl-base/src/syncobjs.pp"/> 240 242 <UnitName Value="syncobjs"/> 241 <EditorIndex Value=" 5"/>243 <EditorIndex Value="8"/> 242 244 <WindowIndex Value="0"/> 243 245 <TopLine Value="35"/> … … 248 250 <Unit25> 249 251 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/customlistview.inc"/> 250 <EditorIndex Value=" 1"/>252 <EditorIndex Value="4"/> 251 253 <WindowIndex Value="0"/> 252 254 <TopLine Value="548"/> … … 257 259 <Unit26> 258 260 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/listitem.inc"/> 259 <EditorIndex Value=" 2"/>261 <EditorIndex Value="5"/> 260 262 <WindowIndex Value="0"/> 261 263 <TopLine Value="798"/> … … 266 268 <Unit27> 267 269 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/listitems.inc"/> 268 <EditorIndex Value=" 3"/>270 <EditorIndex Value="6"/> 269 271 <WindowIndex Value="0"/> 270 272 <TopLine Value="65"/> … … 273 275 <Loaded Value="True"/> 274 276 </Unit27> 277 <Unit28> 278 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/forms.pp"/> 279 <UnitName Value="Forms"/> 280 <EditorIndex Value="1"/> 281 <WindowIndex Value="0"/> 282 <TopLine Value="1398"/> 283 <CursorPos X="15" Y="1309"/> 284 <UsageCount Value="10"/> 285 <Loaded Value="True"/> 286 </Unit28> 287 <Unit29> 288 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/application.inc"/> 289 <EditorIndex Value="2"/> 290 <WindowIndex Value="0"/> 291 <TopLine Value="2161"/> 292 <CursorPos X="33" Y="2161"/> 293 <UsageCount Value="10"/> 294 <Loaded Value="True"/> 295 </Unit29> 275 296 </Units> 276 297 <JumpHistory Count="30" HistoryIndex="29"> 277 298 <Position1> 278 <Filename Value=" ../UMicroThreading.pas"/>279 <Caret Line="37 1" Column="16" TopLine="350"/>299 <Filename Value="UMainForm.pas"/> 300 <Caret Line="374" Column="21" TopLine="368"/> 280 301 </Position1> 281 302 <Position2> 282 <Filename Value=" ../UMicroThreading.pas"/>283 <Caret Line=" 652" Column="38" TopLine="631"/>303 <Filename Value="UMainForm.pas"/> 304 <Caret Line="373" Column="21" TopLine="367"/> 284 305 </Position2> 285 306 <Position3> 286 <Filename Value=" ../UMicroThreading.pas"/>287 <Caret Line=" 746" Column="12" TopLine="725"/>307 <Filename Value="UMainForm.pas"/> 308 <Caret Line="372" Column="21" TopLine="366"/> 288 309 </Position3> 289 310 <Position4> 290 <Filename Value="../UMicroThread ing.pas"/>291 <Caret Line=" 750" Column="31" TopLine="729"/>311 <Filename Value="../UMicroThreadList.pas"/> 312 <Caret Line="94" Column="84" TopLine="83"/> 292 313 </Position4> 293 314 <Position5> 294 <Filename Value="../UMicroThread ing.pas"/>295 <Caret Line=" 753" Column="26" TopLine="732"/>315 <Filename Value="../UMicroThreadList.pas"/> 316 <Caret Line="17" Column="7" TopLine="4"/> 296 317 </Position5> 297 318 <Position6> 298 <Filename Value="../UMicroThread ing.pas"/>299 <Caret Line=" 935" Column="13" TopLine="914"/>319 <Filename Value="../UMicroThreadList.pas"/> 320 <Caret Line="15" Column="38" TopLine="7"/> 300 321 </Position6> 301 322 <Position7> 302 <Filename Value="../UMicroThread ing.pas"/>303 <Caret Line=" 983" Column="31" TopLine="968"/>323 <Filename Value="../UMicroThreadList.pas"/> 324 <Caret Line="17" Column="12" TopLine="4"/> 304 325 </Position7> 305 326 <Position8> 306 <Filename Value="../UMicroThread ing.pas"/>307 <Caret Line="1 013" Column="24" TopLine="992"/>327 <Filename Value="../UMicroThreadList.pas"/> 328 <Caret Line="18" Column="12" TopLine="4"/> 308 329 </Position8> 309 330 <Position9> 310 <Filename Value="../UMicroThread ing.pas"/>311 <Caret Line=" 8" Column="19" TopLine="1"/>331 <Filename Value="../UMicroThreadList.pas"/> 332 <Caret Line="19" Column="12" TopLine="4"/> 312 333 </Position9> 313 334 <Position10> 314 <Filename Value="../UMicroThread ing.pas"/>315 <Caret Line=" 652" Column="51" TopLine="639"/>335 <Filename Value="../UMicroThreadList.pas"/> 336 <Caret Line="20" Column="12" TopLine="4"/> 316 337 </Position10> 317 338 <Position11> 318 <Filename Value="../UMicroThread ing.pas"/>319 <Caret Line=" 645" Column="28" TopLine="639"/>339 <Filename Value="../UMicroThreadList.pas"/> 340 <Caret Line="21" Column="12" TopLine="4"/> 320 341 </Position11> 321 342 <Position12> 322 <Filename Value="../UMicroThread ing.pas"/>323 <Caret Line=" 653" Column="43" TopLine="639"/>343 <Filename Value="../UMicroThreadList.pas"/> 344 <Caret Line="22" Column="12" TopLine="4"/> 324 345 </Position12> 325 346 <Position13> 326 <Filename Value=" ../UMicroThreading.pas"/>327 <Caret Line=" 479" Column="1" TopLine="466"/>347 <Filename Value="UMainForm.pas"/> 348 <Caret Line="372" Column="21" TopLine="26"/> 328 349 </Position13> 329 350 <Position14> 330 <Filename Value="../UMicroThread ing.pas"/>331 <Caret Line=" 712" Column="1" TopLine="699"/>351 <Filename Value="../UMicroThreadList.pas"/> 352 <Caret Line="23" Column="12" TopLine="13"/> 332 353 </Position14> 333 354 <Position15> 334 <Filename Value="../UMicroThread ing.pas"/>335 <Caret Line=" 582" Column="18" TopLine="571"/>355 <Filename Value="../UMicroThreadList.pas"/> 356 <Caret Line="68" Column="3" TopLine="53"/> 336 357 </Position15> 337 358 <Position16> 338 <Filename Value="../UMicroThread ing.pas"/>339 <Caret Line=" 583" Column="65" TopLine="571"/>359 <Filename Value="../UMicroThreadList.pas"/> 360 <Caret Line="69" Column="1" TopLine="53"/> 340 361 </Position16> 341 362 <Position17> 342 <Filename Value=" ../UMicroThreading.pas"/>343 <Caret Line=" 582" Column="20" TopLine="571"/>363 <Filename Value="UMainForm.pas"/> 364 <Caret Line="85" Column="15" TopLine="69"/> 344 365 </Position17> 345 366 <Position18> 346 <Filename Value="../UMicroThread ing.pas"/>347 <Caret Line=" 583" Column="1" TopLine="571"/>367 <Filename Value="../UMicroThreadList.pas"/> 368 <Caret Line="9" Column="43" TopLine="1"/> 348 369 </Position18> 349 370 <Position19> 350 <Filename Value="../UMicroThread ing.pas"/>351 <Caret Line="7 11" Column="1" TopLine="698"/>371 <Filename Value="../UMicroThreadList.pas"/> 372 <Caret Line="72" Column="1" TopLine="53"/> 352 373 </Position19> 353 374 <Position20> 354 375 <Filename Value="../UMicroThreading.pas"/> 355 <Caret Line=" 712" Column="1" TopLine="698"/>376 <Caret Line="1006" Column="18" TopLine="991"/> 356 377 </Position20> 357 378 <Position21> 358 379 <Filename Value="../UMicroThreading.pas"/> 359 <Caret Line=" 713" Column="1" TopLine="698"/>380 <Caret Line="1010" Column="26" TopLine="991"/> 360 381 </Position21> 361 382 <Position22> 362 383 <Filename Value="../UMicroThreading.pas"/> 363 <Caret Line=" 714" Column="1" TopLine="698"/>384 <Caret Line="1009" Column="22" TopLine="991"/> 364 385 </Position22> 365 386 <Position23> 366 387 <Filename Value="../UMicroThreading.pas"/> 367 <Caret Line=" 715" Column="1" TopLine="698"/>388 <Caret Line="1004" Column="43" TopLine="991"/> 368 389 </Position23> 369 390 <Position24> 370 <Filename Value=" ../UMicroThreadList.pas"/>371 <Caret Line=" 95" Column="54" TopLine="83"/>391 <Filename Value="UMainForm.pas"/> 392 <Caret Line="337" Column="23" TopLine="327"/> 372 393 </Position24> 373 394 <Position25> 374 <Filename Value=" ../UMicroThreading.pas"/>375 <Caret Line=" 240" Column="45" TopLine="227"/>395 <Filename Value="UMainForm.pas"/> 396 <Caret Line="338" Column="23" TopLine="328"/> 376 397 </Position25> 377 398 <Position26> 378 <Filename Value=" ../UMicroThreading.pas"/>379 <Caret Line=" 984" Column="40" TopLine="979"/>399 <Filename Value="UMainForm.pas"/> 400 <Caret Line="339" Column="23" TopLine="329"/> 380 401 </Position26> 381 402 <Position27> 382 <Filename Value=" ../UMicroThreading.pas"/>383 <Caret Line=" 992" Column="38" TopLine="979"/>403 <Filename Value="UMainForm.pas"/> 404 <Caret Line="338" Column="23" TopLine="328"/> 384 405 </Position27> 385 406 <Position28> 386 <Filename Value=" ../UMicroThreading.pas"/>387 <Caret Line=" 989" Column="55" TopLine="976"/>407 <Filename Value="UMainForm.pas"/> 408 <Caret Line="339" Column="23" TopLine="329"/> 388 409 </Position28> 389 410 <Position29> 390 <Filename Value=" ../UMicroThreading.pas"/>391 <Caret Line=" 990" Column="24" TopLine="976"/>411 <Filename Value="UMainForm.pas"/> 412 <Caret Line="340" Column="23" TopLine="330"/> 392 413 </Position29> 393 414 <Position30> 394 <Filename Value=" ../UMicroThreading.pas"/>395 <Caret Line=" 989" Column="29" TopLine="976"/>415 <Filename Value="UMainForm.pas"/> 416 <Caret Line="341" Column="23" TopLine="331"/> 396 417 </Position30> 397 418 </JumpHistory> -
MicroThreading/Demo/UMainForm.lfm
r162 r164 5 5 Width = 816 6 6 Caption = 'MicroThreading demo' 7 ClientHeight = 5 337 ClientHeight = 514 8 8 ClientWidth = 816 9 Menu = MainMenu1 9 10 OnCreate = FormCreate 10 11 OnDestroy = FormDestroy … … 13 14 object PageControl1: TPageControl 14 15 Left = 8 15 Height = 5 1916 Height = 500 16 17 Top = 8 17 18 Width = 802 … … 22 23 object TabSheet2: TTabSheet 23 24 Caption = 'Scheduler state' 24 ClientHeight = 4 9325 ClientHeight = 474 25 26 ClientWidth = 794 26 27 object GroupBox1: TGroupBox … … 33 34 ClientWidth = 201 34 35 TabOrder = 0 35 object Label5: TLabel36 Left = 937 Height = 1438 Top = 439 Width = 11740 Caption = 'Logical processor count:'41 ParentColor = False42 end43 object Label6: TLabel44 Left = 15045 Height = 1446 Top = 447 Width = 1348 Caption = ' '49 ParentColor = False50 end51 object Label7: TLabel52 Left = 853 Height = 1454 Top = 2055 Width = 6956 Caption = 'Thread count:'57 ParentColor = False58 end59 object Label8: TLabel60 Left = 961 Height = 1462 Top = 3663 Width = 9564 Caption = 'Micro thread count:'65 ParentColor = False66 end67 object Label9: TLabel68 Left = 15069 Height = 1470 Top = 2071 Width = 1372 Caption = ' '73 ParentColor = False74 end75 object Label10: TLabel76 Left = 15177 Height = 1478 Top = 3679 Width = 1380 Caption = ' '81 ParentColor = False82 end83 36 object Label15: TLabel 84 37 Left = 9 … … 403 356 top = 115 404 357 end 358 object MainMenu1: TMainMenu 359 left = 512 360 top = 115 361 object MenuItem1: TMenuItem 362 Caption = 'New Item1' 363 object MenuItem2: TMenuItem 364 Caption = 'New Item2' 365 end 366 object MenuItem4: TMenuItem 367 Caption = 'New Item4' 368 end 369 end 370 object MenuItem3: TMenuItem 371 Caption = 'New Item3' 372 end 373 end 405 374 end -
MicroThreading/Demo/UMainForm.pas
r162 r164 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, ExtCtrls, Spin, UMicroThreading, DateUtils, UPlatform,9 ComCtrls, ExtCtrls, Spin, Menus, UMicroThreading, DateUtils, UPlatform, 10 10 UMicroThreadList, UThreadEx; 11 11 … … 46 46 GroupBox2: TGroupBox; 47 47 GroupBox3: TGroupBox; 48 Label10: TLabel;49 48 Label11: TLabel; 50 49 Label12: TLabel; … … 57 56 Label3: TLabel; 58 57 Label4: TLabel; 59 Label5: TLabel; 60 Label6: TLabel; 61 Label7: TLabel; 62 Label8: TLabel; 63 Label9: TLabel; 58 MainMenu1: TMainMenu; 64 59 Memo1: TMemo; 60 MenuItem1: TMenuItem; 61 MenuItem2: TMenuItem; 62 MenuItem3: TMenuItem; 63 MenuItem4: TMenuItem; 65 64 PageControl1: TPageControl; 66 65 SpinEdit1: TSpinEdit; … … 134 133 DoubleBuffered := True; 135 134 // ListView1.DoubleBuffered := True; 136 Label6.Caption := IntToStr(GetLogicalProcessorCount);137 135 Event := TMicroThreadEvent.Create; 138 136 MicroThreadList := TMicroThreadList.Create(Self); … … 345 343 Label2.Caption := DateTimeToStr(NowPrecise) + ' ' + 346 344 FloatToStr(Frac(NowPrecise / OneSecond)); 347 Label9.Caption := IntToStr(MainScheduler.ThreadPoolCount);348 Label10.Caption := IntToStr(MainScheduler.MicroThreadCount);349 345 end; 350 346
Note:
See TracChangeset
for help on using the changeset viewer.