Changeset 170
- Timestamp:
- Feb 21, 2011, 2:00:03 PM (14 years ago)
- Location:
- MicroThreading
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
MicroThreading/Demo/Demo.lpi
r169 r170 43 43 </Item3> 44 44 </RequiredPackages> 45 <Units Count="3 4">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=" 12"/>62 <WindowIndex Value="0"/> 63 <TopLine Value=" 407"/>64 <CursorPos X=" 54" Y="428"/>61 <EditorIndex Value="8"/> 62 <WindowIndex Value="0"/> 63 <TopLine Value="284"/> 64 <CursorPos X="44" Y="305"/> 65 65 <UsageCount Value="270"/> 66 66 <Loaded Value="True"/> … … 73 73 <EditorIndex Value="0"/> 74 74 <WindowIndex Value="0"/> 75 <TopLine Value="4 49"/>76 <CursorPos X="1" Y="4 62"/>75 <TopLine Value="476"/> 76 <CursorPos X="1" Y="495"/> 77 77 <UsageCount Value="136"/> 78 78 <Loaded Value="True"/> … … 84 84 <TopLine Value="1"/> 85 85 <CursorPos X="27" Y="9"/> 86 <UsageCount Value=" 18"/>86 <UsageCount Value="5"/> 87 87 </Unit3> 88 88 <Unit4> … … 92 92 <TopLine Value="1"/> 93 93 <CursorPos X="12" Y="8"/> 94 <UsageCount Value=" 25"/>94 <UsageCount Value="12"/> 95 95 </Unit4> 96 96 <Unit5> … … 100 100 <TopLine Value="1034"/> 101 101 <CursorPos X="14" Y="1037"/> 102 <UsageCount Value=" 20"/>102 <UsageCount Value="7"/> 103 103 </Unit5> 104 104 <Unit6> 105 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.4.3/fpc/2.4.3/source/rtl/ objpas/classes/classesh.inc"/>106 <WindowIndex Value="0"/> 107 <TopLine Value="1 638"/>108 <CursorPos X=" 28" Y="1645"/>109 <UsageCount Value=" 1"/>105 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.4.3/fpc/2.4.3/source/rtl/win/wininc/func.inc"/> 106 <WindowIndex Value="0"/> 107 <TopLine Value="147"/> 108 <CursorPos X="1" Y="158"/> 109 <UsageCount Value="8"/> 110 110 </Unit6> 111 111 <Unit7> 112 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.4.3/fpc/2.4.3/source/rtl/ win/wininc/func.inc"/>113 <WindowIndex Value="0"/> 114 <TopLine Value="14 7"/>115 <CursorPos X="1 " Y="158"/>116 <UsageCount Value=" 21"/>112 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.4.3/fpc/2.4.3/source/rtl/objpas/sysutils/osutilsh.inc"/> 113 <WindowIndex Value="0"/> 114 <TopLine Value="14"/> 115 <CursorPos X="11" Y="27"/> 116 <UsageCount Value="9"/> 117 117 </Unit7> 118 118 <Unit8> 119 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.4.3/fpc/2.4.3/source/rtl/objpas/sysutils/osutilsh.inc"/> 120 <WindowIndex Value="0"/> 121 <TopLine Value="14"/> 122 <CursorPos X="11" Y="27"/> 123 <UsageCount Value="22"/> 119 <Filename Value="../UPlatform.pas"/> 120 <UnitName Value="UPlatform"/> 121 <EditorIndex Value="4"/> 122 <WindowIndex Value="0"/> 123 <TopLine Value="25"/> 124 <CursorPos X="41" Y="39"/> 125 <UsageCount Value="108"/> 126 <Loaded Value="True"/> 124 127 </Unit8> 125 128 <Unit9> 126 <Filename Value="../UPlatform.pas"/>127 <UnitName Value="UPlatform"/>128 <EditorIndex Value="3"/>129 <WindowIndex Value="0"/>130 <TopLine Value="25"/>131 <CursorPos X="41" Y="39"/>132 <UsageCount Value="42"/>133 <Loaded Value="True"/>134 </Unit9>135 <Unit10>136 129 <Filename Value="../UMicroThreadList.pas"/> 137 130 <ComponentName Value="MicroThreadListForm"/> 138 131 <ResourceBaseClass Value="Form"/> 139 132 <UnitName Value="UMicroThreadList"/> 140 <EditorIndex Value=" 7"/>141 <WindowIndex Value="0"/> 142 <TopLine Value="1 21"/>143 <CursorPos X=" 10" Y="138"/>144 <UsageCount Value=" 28"/>133 <EditorIndex Value="6"/> 134 <WindowIndex Value="0"/> 135 <TopLine Value="109"/> 136 <CursorPos X="36" Y="126"/> 137 <UsageCount Value="94"/> 145 138 <Loaded Value="True"/> 146 139 <LoadedDesigner Value="True"/> 140 </Unit9> 141 <Unit10> 142 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/sysutils/sysutilh.inc"/> 143 <WindowIndex Value="0"/> 144 <TopLine Value="191"/> 145 <CursorPos X="13" Y="204"/> 146 <UsageCount Value="7"/> 147 147 </Unit10> 148 148 <Unit11> 149 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/ fpc/2.5.1/source/rtl/objpas/sysutils/sysutilh.inc"/>150 <WindowIndex Value="0"/> 151 <TopLine Value=" 191"/>152 <CursorPos X="1 3" Y="204"/>153 <UsageCount Value=" 20"/>149 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/lcl/interfaces/win32/win32object.inc"/> 150 <WindowIndex Value="0"/> 151 <TopLine Value="600"/> 152 <CursorPos X="1" Y="613"/> 153 <UsageCount Value="6"/> 154 154 </Unit11> 155 155 <Unit12> 156 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/ lcl/interfaces/win32/win32object.inc"/>157 <WindowIndex Value="0"/> 158 <TopLine Value=" 600"/>159 <CursorPos X=" 1" Y="613"/>160 <UsageCount Value=" 19"/>156 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/classes/classesh.inc"/> 157 <WindowIndex Value="0"/> 158 <TopLine Value="1483"/> 159 <CursorPos X="51" Y="1490"/> 160 <UsageCount Value="6"/> 161 161 </Unit12> 162 162 <Unit13> 163 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/ objpas/classes/classesh.inc"/>164 <WindowIndex Value="0"/> 165 <TopLine Value=" 1483"/>166 <CursorPos X=" 51" Y="1490"/>167 <UsageCount Value=" 19"/>163 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/win/tthread.inc"/> 164 <WindowIndex Value="0"/> 165 <TopLine Value="30"/> 166 <CursorPos X="3" Y="15"/> 167 <UsageCount Value="6"/> 168 168 </Unit13> 169 169 <Unit14> 170 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/win/tthread.inc"/> 171 <WindowIndex Value="0"/> 172 <TopLine Value="30"/> 173 <CursorPos X="3" Y="15"/> 174 <UsageCount Value="19"/> 170 <Filename Value="../UThreadEx.pas"/> 171 <UnitName Value="UThreadEx"/> 172 <EditorIndex Value="1"/> 173 <WindowIndex Value="0"/> 174 <TopLine Value="33"/> 175 <CursorPos X="3" Y="37"/> 176 <UsageCount Value="95"/> 177 <Loaded Value="True"/> 175 178 </Unit14> 176 179 <Unit15> 177 <Filename Value="../UThreadEx.pas"/> 178 <UnitName Value="UThreadEx"/> 179 <WindowIndex Value="0"/> 180 <TopLine Value="1"/> 181 <CursorPos X="20" Y="1"/> 182 <UsageCount Value="29"/> 180 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/systemh.inc"/> 181 <WindowIndex Value="0"/> 182 <TopLine Value="469"/> 183 <CursorPos X="18" Y="484"/> 184 <UsageCount Value="6"/> 183 185 </Unit15> 184 186 <Unit16> 185 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/system h.inc"/>186 <WindowIndex Value="0"/> 187 <TopLine Value=" 469"/>188 <CursorPos X="1 8" Y="484"/>189 <UsageCount Value=" 19"/>187 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/system.inc"/> 188 <WindowIndex Value="0"/> 189 <TopLine Value="920"/> 190 <CursorPos X="17" Y="942"/> 191 <UsageCount Value="6"/> 190 192 </Unit16> 191 193 <Unit17> 192 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/ inc/system.inc"/>193 <WindowIndex Value="0"/> 194 <TopLine Value=" 920"/>195 <CursorPos X="1 7" Y="942"/>196 <UsageCount Value=" 19"/>194 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/sysutils/osutilsh.inc"/> 195 <WindowIndex Value="0"/> 196 <TopLine Value="14"/> 197 <CursorPos X="11" Y="27"/> 198 <UsageCount Value="6"/> 197 199 </Unit17> 198 200 <Unit18> 199 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/ objpas/sysutils/osutilsh.inc"/>200 <WindowIndex Value="0"/> 201 <TopLine Value=" 14"/>202 <CursorPos X=" 11" Y="27"/>203 <UsageCount Value=" 19"/>201 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/threadh.inc"/> 202 <WindowIndex Value="0"/> 203 <TopLine Value="57"/> 204 <CursorPos X="5" Y="70"/> 205 <UsageCount Value="6"/> 204 206 </Unit18> 205 207 <Unit19> 206 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/thread h.inc"/>207 <WindowIndex Value="0"/> 208 <TopLine Value=" 57"/>209 <CursorPos X=" 5" Y="70"/>210 <UsageCount Value=" 19"/>208 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/thread.inc"/> 209 <WindowIndex Value="0"/> 210 <TopLine Value="169"/> 211 <CursorPos X="33" Y="184"/> 212 <UsageCount Value="6"/> 211 213 </Unit19> 212 214 <Unit20> 213 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/ inc/thread.inc"/>214 <WindowIndex Value="0"/> 215 <TopLine Value=" 169"/>216 <CursorPos X=" 33" Y="184"/>217 <UsageCount Value=" 19"/>215 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/objpas/sysutils/sysutils.inc"/> 216 <WindowIndex Value="0"/> 217 <TopLine Value="429"/> 218 <CursorPos X="19" Y="435"/> 219 <UsageCount Value="5"/> 218 220 </Unit20> 219 221 <Unit21> 220 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/ objpas/sysutils/sysutils.inc"/>221 <WindowIndex Value="0"/> 222 <TopLine Value=" 429"/>223 <CursorPos X="1 9" Y="435"/>224 <UsageCount Value=" 18"/>222 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/objpash.inc"/> 223 <WindowIndex Value="0"/> 224 <TopLine Value="329"/> 225 <CursorPos X="14" Y="342"/> 226 <UsageCount Value="5"/> 225 227 </Unit21> 226 228 <Unit22> 227 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/ objpash.inc"/>228 <WindowIndex Value="0"/> 229 <TopLine Value=" 329"/>230 <CursorPos X=" 14" Y="342"/>231 <UsageCount Value=" 18"/>229 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/except.inc"/> 230 <WindowIndex Value="0"/> 231 <TopLine Value="29"/> 232 <CursorPos X="23" Y="42"/> 233 <UsageCount Value="2"/> 232 234 </Unit22> 233 235 <Unit23> 234 <Filename Value="../../../../Programy/Lazarus/0.9.31_2.5.1/fpc/2.5.1/source/rtl/inc/except.inc"/> 235 <WindowIndex Value="0"/> 236 <TopLine Value="29"/> 237 <CursorPos X="23" Y="42"/> 238 <UsageCount Value="15"/> 236 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/packages/fcl-base/src/syncobjs.pp"/> 237 <UnitName Value="syncobjs"/> 238 <WindowIndex Value="0"/> 239 <TopLine Value="35"/> 240 <CursorPos X="18" Y="45"/> 241 <UsageCount Value="4"/> 239 242 </Unit23> 240 243 <Unit24> 241 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/packages/fcl-base/src/syncobjs.pp"/> 242 <UnitName Value="syncobjs"/> 243 <EditorIndex Value="11"/> 244 <WindowIndex Value="0"/> 245 <TopLine Value="35"/> 246 <CursorPos X="18" Y="45"/> 247 <UsageCount Value="17"/> 244 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/customlistview.inc"/> 245 <EditorIndex Value="5"/> 246 <WindowIndex Value="0"/> 247 <TopLine Value="548"/> 248 <CursorPos X="1" Y="561"/> 249 <UsageCount Value="82"/> 248 250 <Loaded Value="True"/> 249 251 </Unit24> 250 252 <Unit25> 251 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/customlistview.inc"/> 252 <EditorIndex Value="4"/> 253 <WindowIndex Value="0"/> 254 <TopLine Value="548"/> 255 <CursorPos X="1" Y="561"/> 256 <UsageCount Value="16"/> 257 <Loaded Value="True"/> 253 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/listitem.inc"/> 254 <WindowIndex Value="0"/> 255 <TopLine Value="798"/> 256 <CursorPos X="1" Y="821"/> 257 <UsageCount Value="3"/> 258 258 </Unit25> 259 259 <Unit26> 260 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/listitem.inc"/> 261 <EditorIndex Value="5"/> 262 <WindowIndex Value="0"/> 263 <TopLine Value="798"/> 264 <CursorPos X="1" Y="821"/> 265 <UsageCount Value="16"/> 266 <Loaded Value="True"/> 260 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/listitems.inc"/> 261 <WindowIndex Value="0"/> 262 <TopLine Value="65"/> 263 <CursorPos X="29" Y="75"/> 264 <UsageCount Value="3"/> 267 265 </Unit26> 268 266 <Unit27> 269 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/listitems.inc"/> 270 <EditorIndex Value="6"/> 271 <WindowIndex Value="0"/> 272 <TopLine Value="65"/> 273 <CursorPos X="29" Y="75"/> 274 <UsageCount Value="16"/> 267 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/forms.pp"/> 268 <UnitName Value="Forms"/> 269 <EditorIndex Value="2"/> 270 <WindowIndex Value="0"/> 271 <TopLine Value="1398"/> 272 <CursorPos X="15" Y="1309"/> 273 <UsageCount Value="81"/> 275 274 <Loaded Value="True"/> 276 275 </Unit27> 277 276 <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="15"/> 277 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/application.inc"/> 278 <EditorIndex Value="3"/> 279 <WindowIndex Value="0"/> 280 <TopLine Value="2161"/> 281 <CursorPos X="33" Y="2161"/> 282 <UsageCount Value="81"/> 285 283 <Loaded Value="True"/> 286 284 </Unit28> 287 285 <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="15"/>294 <Loaded Value="True"/>295 </Unit29>296 <Unit30>297 286 <Filename Value="../UMicroThreadCallStack.pas"/> 298 287 <ComponentName Value="CallStackForm"/> 299 288 <ResourceBaseClass Value="Form"/> 300 289 <UnitName Value="UMicroThreadCallStack"/> 301 <EditorIndex Value=" 8"/>290 <EditorIndex Value="7"/> 302 291 <WindowIndex Value="0"/> 303 292 <TopLine Value="44"/> 304 293 <CursorPos X="22" Y="66"/> 305 <UsageCount Value=" 14"/>294 <UsageCount Value="80"/> 306 295 <Loaded Value="True"/> 307 296 <LoadedDesigner Value="True"/> 308 </Unit30> 309 <Unit31> 310 <Filename Value="../UStackTrace.pas"/> 311 <UnitName Value="UStackTrace"/> 312 <WindowIndex Value="0"/> 313 <TopLine Value="17"/> 314 <CursorPos X="26" Y="122"/> 315 <UsageCount Value="11"/> 316 </Unit31> 317 <Unit32> 318 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/inc/systemh.inc"/> 319 <EditorIndex Value="9"/> 320 <WindowIndex Value="0"/> 321 <TopLine Value="974"/> 322 <CursorPos X="10" Y="987"/> 323 <UsageCount Value="11"/> 324 <Loaded Value="True"/> 325 </Unit32> 326 <Unit33> 327 <Filename Value="../../../../Projekty2/FreePascalManager/trunk/Instance/1/FPC/rtl/i386/i386.inc"/> 328 <EditorIndex Value="10"/> 329 <WindowIndex Value="0"/> 330 <TopLine Value="1135"/> 331 <CursorPos X="10" Y="1139"/> 332 <UsageCount Value="11"/> 333 <Loaded Value="True"/> 334 </Unit33> 297 </Unit29> 335 298 </Units> 336 <JumpHistory Count=" 14" HistoryIndex="13">299 <JumpHistory Count="30" HistoryIndex="29"> 337 300 <Position1> 338 301 <Filename Value="../UMicroThreading.pas"/> 339 <Caret Line=" 854" Column="3" TopLine="847"/>302 <Caret Line="407" Column="41" TopLine="400"/> 340 303 </Position1> 341 304 <Position2> 342 305 <Filename Value="../UMicroThreading.pas"/> 343 <Caret Line=" 853" Column="41" TopLine="847"/>306 <Caret Line="381" Column="36" TopLine="371"/> 344 307 </Position2> 345 308 <Position3> 346 309 <Filename Value="../UMicroThreading.pas"/> 347 <Caret Line=" 854" Column="1" TopLine="847"/>310 <Caret Line="492" Column="26" TopLine="480"/> 348 311 </Position3> 349 312 <Position4> 350 313 <Filename Value="../UMicroThreading.pas"/> 351 <Caret Line=" 855" Column="1" TopLine="847"/>314 <Caret Line="489" Column="1" TopLine="480"/> 352 315 </Position4> 353 316 <Position5> 354 <Filename Value="../UMicroThread CallStack.pas"/>355 <Caret Line=" 67" Column="38" TopLine="46"/>317 <Filename Value="../UMicroThreading.pas"/> 318 <Caret Line="490" Column="1" TopLine="480"/> 356 319 </Position5> 357 320 <Position6> 358 <Filename Value="../UMicroThread CallStack.pas"/>359 <Caret Line=" 66" Column="19" TopLine="47"/>321 <Filename Value="../UMicroThreading.pas"/> 322 <Caret Line="491" Column="1" TopLine="480"/> 360 323 </Position6> 361 324 <Position7> 362 <Filename Value="../UMicroThread CallStack.pas"/>363 <Caret Line=" 67" Column="14" TopLine="47"/>325 <Filename Value="../UMicroThreading.pas"/> 326 <Caret Line="492" Column="1" TopLine="480"/> 364 327 </Position7> 365 328 <Position8> 366 <Filename Value="../UMicroThread CallStack.pas"/>367 <Caret Line=" 66" Column="22" TopLine="44"/>329 <Filename Value="../UMicroThreading.pas"/> 330 <Caret Line="493" Column="1" TopLine="480"/> 368 331 </Position8> 369 332 <Position9> 370 <Filename Value="../UMicroThread List.pas"/>371 <Caret Line=" 138" Column="10" TopLine="121"/>333 <Filename Value="../UMicroThreading.pas"/> 334 <Caret Line="489" Column="1" TopLine="480"/> 372 335 </Position9> 373 336 <Position10> 374 <Filename Value=" UMainForm.pas"/>375 <Caret Line="4 28" Column="43" TopLine="411"/>337 <Filename Value="../UMicroThreading.pas"/> 338 <Caret Line="490" Column="1" TopLine="480"/> 376 339 </Position10> 377 340 <Position11> 378 <Filename Value=" UMainForm.pas"/>379 <Caret Line=" 116" Column="33" TopLine="103"/>341 <Filename Value="../UMicroThreading.pas"/> 342 <Caret Line="491" Column="1" TopLine="480"/> 380 343 </Position11> 381 344 <Position12> 382 <Filename Value=" UMainForm.pas"/>383 <Caret Line=" 305" Column="44" TopLine="284"/>345 <Filename Value="../UMicroThreading.pas"/> 346 <Caret Line="498" Column="1" TopLine="480"/> 384 347 </Position12> 385 348 <Position13> 386 <Filename Value=" UMainForm.pas"/>387 <Caret Line=" 399" Column="54" TopLine="378"/>349 <Filename Value="../UMicroThreading.pas"/> 350 <Caret Line="500" Column="1" TopLine="480"/> 388 351 </Position13> 389 352 <Position14> 390 <Filename Value=" UMainForm.pas"/>391 <Caret Line=" 428" Column="54" TopLine="407"/>353 <Filename Value="../UMicroThreading.pas"/> 354 <Caret Line="502" Column="1" TopLine="480"/> 392 355 </Position14> 356 <Position15> 357 <Filename Value="../UMicroThreading.pas"/> 358 <Caret Line="489" Column="1" TopLine="480"/> 359 </Position15> 360 <Position16> 361 <Filename Value="../UMicroThreading.pas"/> 362 <Caret Line="490" Column="1" TopLine="480"/> 363 </Position16> 364 <Position17> 365 <Filename Value="../UMicroThreading.pas"/> 366 <Caret Line="491" Column="1" TopLine="480"/> 367 </Position17> 368 <Position18> 369 <Filename Value="../UMicroThreading.pas"/> 370 <Caret Line="513" Column="1" TopLine="508"/> 371 </Position18> 372 <Position19> 373 <Filename Value="../UMicroThreading.pas"/> 374 <Caret Line="514" Column="1" TopLine="508"/> 375 </Position19> 376 <Position20> 377 <Filename Value="../UMicroThreading.pas"/> 378 <Caret Line="515" Column="1" TopLine="508"/> 379 </Position20> 380 <Position21> 381 <Filename Value="../UMicroThreading.pas"/> 382 <Caret Line="516" Column="1" TopLine="508"/> 383 </Position21> 384 <Position22> 385 <Filename Value="../UMicroThreading.pas"/> 386 <Caret Line="517" Column="1" TopLine="508"/> 387 </Position22> 388 <Position23> 389 <Filename Value="../UMicroThreading.pas"/> 390 <Caret Line="521" Column="25" TopLine="508"/> 391 </Position23> 392 <Position24> 393 <Filename Value="../UMicroThreading.pas"/> 394 <Caret Line="513" Column="1" TopLine="508"/> 395 </Position24> 396 <Position25> 397 <Filename Value="../UMicroThreading.pas"/> 398 <Caret Line="489" Column="1" TopLine="476"/> 399 </Position25> 400 <Position26> 401 <Filename Value="../UMicroThreading.pas"/> 402 <Caret Line="490" Column="1" TopLine="476"/> 403 </Position26> 404 <Position27> 405 <Filename Value="../UMicroThreading.pas"/> 406 <Caret Line="491" Column="1" TopLine="476"/> 407 </Position27> 408 <Position28> 409 <Filename Value="../UMicroThreading.pas"/> 410 <Caret Line="492" Column="1" TopLine="476"/> 411 </Position28> 412 <Position29> 413 <Filename Value="../UMicroThreading.pas"/> 414 <Caret Line="493" Column="1" TopLine="476"/> 415 </Position29> 416 <Position30> 417 <Filename Value="../UMicroThreading.pas"/> 418 <Caret Line="494" Column="1" TopLine="476"/> 419 </Position30> 393 420 </JumpHistory> 394 421 </ProjectOptions> -
MicroThreading/UMicroThreading.pas
r169 r170 53 53 TMicroThreadCriticalSection = class 54 54 private 55 FId: Integer; 55 56 FMicroThreads: TObjectList; 56 Lock: TCriticalSection;57 //Lock: TCriticalSection; 57 58 FCounter: Integer; 58 59 public … … 61 62 constructor Create; 62 63 destructor Destroy; override; 64 property Id: Integer read FId; 63 65 end; 64 66 … … 208 210 FThreadPoolSize: Integer; 209 211 FRoundRobinIndex: Integer; 210 FLastId: Integer; 212 FMicroThreadLastId: Integer; 213 FCriticalSectionLastId: Integer; 211 214 FMainThreadTerminated: Boolean; 212 215 FMicroThreads: TObjectList; // TList<TMicroThread> … … 232 235 procedure MainThreadStart(Sender: TObject); 233 236 procedure MainThreadTick(Data: PtrInt); 237 function GetCriticalSectionId: Integer; 234 238 public 235 239 BurstCount: Integer; 236 240 function Add(MicroThread: TMicroThread): Integer; 237 function AddMethod(Method: TProcedureOfObject; WaitForFinish: Boolean = True): Integer; 241 function AddMethod(Method: TProcedureOfObject; 242 WaitForFinish: Boolean = True; ThreadName: string = ''): Integer; 238 243 procedure Remove(MicroThread: TMicroThread; Free: Boolean = True); 239 244 constructor Create; … … 282 287 const 283 288 LogFileName: string = 'Log.txt'; 289 LogEnabled: Boolean = False; 284 290 285 291 implementation … … 350 356 LogFile: TextFile; 351 357 begin 358 if LogEnabled then 352 359 try 353 360 LogLock.Acquire; … … 373 380 try 374 381 MainScheduler.FMicroThreadsLock.Acquire; 375 Lock.Acquire; 382 {$IFDEF DebugCriticalSection} 383 Log('CriticalSection(' + IntToStr(FId) + ') Acquire start, MicroThread: ' + IntToStr(MT.Id) + '(' + MT.Name + ')'); 384 {$ENDIF} 385 //Lock.Acquire; 376 386 Inc(FCounter); 387 {$IFDEF DebugCriticalSection} 388 Log('CriticalSection(' + IntToStr(FId) + ') Acquire Counter: ' + IntToStr(FCounter)); 389 {$ENDIF} 377 390 if FCounter > 1 then begin 378 391 FMicroThreads.Add(MT); … … 380 393 MT.FStatePending := tsBlocked; 381 394 try 382 Lock.Release;395 //Lock.Release; 383 396 MainScheduler.FMicroThreadsLock.Release; 384 397 MT.Yield; 385 398 finally 386 399 MainScheduler.FMicroThreadsLock.Acquire; 387 Lock.Acquire;400 //Lock.Acquire; 388 401 end; 389 402 end; 390 403 finally 391 Lock.Release; 404 {$IFDEF DebugCriticalSection} 405 Log('CriticalSection(' + IntToStr(FId) + ') Acquire end: Id:' + IntToStr(MT.Id) + ' Name:' + MT.Name); 406 {$ENDIF} 407 //Lock.Release; 392 408 MainScheduler.FMicroThreadsLock.Release; 393 409 end else … … 396 412 397 413 procedure TMicroThreadCriticalSection.Release; 414 var 415 MT: TMicroThread; 398 416 begin 399 417 try 400 418 MainScheduler.FMicroThreadsLock.Acquire; 401 Lock.Acquire; 419 {$IFDEF DebugCriticalSection} 420 MT := GetCurrentMicroThread; 421 if Assigned(MT) then 422 Log('CriticalSection(' + IntToStr(FId) + ') Release start: Id:' + IntToStr(MT.Id) + ' Name:' + MT.Name) 423 else Log('CriticalSection(' + IntToStr(FId) + ') Release start: no microthread'); 424 {$ENDIF} 425 //Lock.Acquire; 402 426 Dec(FCounter); 427 {$IFDEF DebugCriticalSection} 428 Log('CriticalSection(' + IntToStr(FId) + ') Release Counter: ' + IntToStr(FCounter)); 429 {$ENDIF} 403 430 if FMicroThreads.Count > 0 then begin 404 431 // Release one waiting micro thread … … 410 437 raise EMicroThreadError.Create(SCriticalSectionDecrement); 411 438 finally 412 Lock.Release; 439 {$IFDEF DebugCriticalSection} 440 Log('CriticalSection(' + IntToStr(FId) + ') Release end: Id:' + IntToStr(MT.Id) + ' Name:' + MT.Name); 441 {$ENDIF} 442 //Lock.Release; 413 443 MainScheduler.FMicroThreadsLock.Release; 414 444 end; … … 417 447 constructor TMicroThreadCriticalSection.Create; 418 448 begin 419 Lock := TCriticalSection.Create;449 //Lock := TCriticalSection.Create; 420 450 FMicroThreads := TObjectList.Create; 421 451 FMicroThreads.OwnsObjects := False; 452 FId := MainScheduler.GetCriticalSectionId; 422 453 end; 423 454 … … 426 457 try 427 458 MainScheduler.FMicroThreadsLock.Acquire; 428 Lock.Acquire;459 //Lock.Acquire; 429 460 430 461 while FMicroThreads.Count > 0 do begin … … 434 465 end; 435 466 finally 436 Lock.Release;467 //Lock.Release; 437 468 MainScheduler.FMicroThreadsLock.Release; 438 469 end; 439 470 FMicroThreads.Free; 440 Lock.Free;471 //Lock.Free; 441 472 inherited Destroy; 442 473 end; … … 488 519 Exit; 489 520 end; 490 FMicroThreads.Add( Self);521 FMicroThreads.Add(MT); 491 522 MT.FBlockTime := NowPrecise + Duration; 492 523 MT.FBlockState := tbsWaitFor; … … 798 829 procedure TMicroThread.Yield; 799 830 begin 800 //if not Assigned(FManager) then801 //raise EMicroThreadError.Create(SManagerReferenceLost);831 if not Assigned(FManager) then 832 raise EMicroThreadError.Create(SManagerReferenceLost); 802 833 if FStatePending = tsNone then 803 834 FStatePending := tsWaiting; … … 896 927 try 897 928 FMicroThreadsLock.Acquire; 898 Inc(FLastId); 929 Inc(FMicroThreadLastId); 930 MicroThread.FId := FMicroThreadLastId; 899 931 MicroThread.FScheduler := Self; 900 MicroThread.FId := FLastId;901 932 Result := FMicroThreads.Add(MicroThread); 902 933 finally … … 905 936 end; 906 937 907 function TMicroThreadScheduler.AddMethod(Method: TProcedureOfObject; WaitForFinish: Boolean): Integer; 938 function TMicroThreadScheduler.AddMethod(Method: TProcedureOfObject; 939 WaitForFinish: Boolean = True; ThreadName: string = ''): Integer; 908 940 var 909 941 NewMicroThread: TMicroThreadSimple; … … 912 944 try 913 945 NewMicroThread := TMicroThreadSimple.Create(True); 946 NewMicroThread.Name := ThreadName; 914 947 NewMicroThread.Method := Method; 915 948 NewMicroThread.FScheduler := Self; … … 1083 1116 // end; 1084 1117 FMainThreadOutsideStart := NowPrecise; 1118 end; 1119 1120 function TMicroThreadScheduler.GetCriticalSectionId: Integer; 1121 begin 1122 Inc(FCriticalSectionLastId); 1123 Result := FCriticalSectionLastId; 1085 1124 end; 1086 1125
Note:
See TracChangeset
for help on using the changeset viewer.