equal
deleted
inserted
replaced
284 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
284 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
285 ObjectMemory addDependent:self. |
285 ObjectMemory addDependent:self. |
286 ^ self |
286 ^ self |
287 ]. |
287 ]. |
288 |
288 |
|
289 "/ |
|
290 "/ allow interrupts to be handled here |
|
291 "/ (but continue with interrupts disabled) |
|
292 "/ |
289 wasBlocked ifFalse:[ |
293 wasBlocked ifFalse:[ |
290 OperatingSystem unblockInterrupts. |
294 OperatingSystem unblockInterrupts. |
291 OperatingSystem blockInterrupts. |
295 OperatingSystem blockInterrupts. |
292 ]. |
296 ]. |
293 |
297 |
305 ('Registry [info]: object (' , (registeredObjects at:index) printString , ') is already registered') infoPrintCR. |
309 ('Registry [info]: object (' , (registeredObjects at:index) printString , ') is already registered') infoPrintCR. |
306 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
310 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
307 ^ self |
311 ^ self |
308 ]. |
312 ]. |
309 |
313 |
|
314 "/ |
|
315 "/ allow interrupts to be handled here |
|
316 "/ (but continue with interrupts disabled) |
|
317 "/ |
310 wasBlocked ifFalse:[ |
318 wasBlocked ifFalse:[ |
311 OperatingSystem unblockInterrupts. |
319 OperatingSystem unblockInterrupts. |
312 OperatingSystem blockInterrupts. |
320 OperatingSystem blockInterrupts. |
313 ]. |
321 ]. |
314 |
322 |
315 "search for a free slot, on the fly look for leftovers (no longer happens)" |
323 "/ |
|
324 "/ search for a free slot ... |
|
325 "/ on the fly look for leftovers (should no longer happen) |
|
326 "/ |
316 idx0 := 1. |
327 idx0 := 1. |
317 index := registeredObjects identityIndexOf:nil startingAt:idx0. |
328 index := registeredObjects identityIndexOf:nil startingAt:idx0. |
318 [index ~~ 0] whileTrue:[ |
329 [index ~~ 0] whileTrue:[ |
319 "is there a leftover ?" |
330 "is there a leftover ?" |
320 p := handleArray at:index. |
331 p := handleArray at:index. |
329 ]. |
340 ]. |
330 |
341 |
331 "/ mhmh - a registeredObject vanished, but its |
342 "/ mhmh - a registeredObject vanished, but its |
332 "/ phantom is still there ... |
343 "/ phantom is still there ... |
333 |
344 |
334 'Registry [warning]: there should be no leftOvers' errorPrintCR. |
345 "/ |
|
346 "/ this may happen, if the registries dispose handling is |
|
347 "/ currently being executed by a lower priority process, |
|
348 "/ and the registeredObject has already been nilled, |
|
349 "/ but the phantom is being notified (in the other process). |
|
350 |
|
351 'Registry [warning]: leftOver phantom' errorPrintCR. |
|
352 'Registry [info]: phantom:' infoPrintCR. |
|
353 p infoPrintCR. |
335 |
354 |
336 "/ "tell the phantom" |
355 "/ "tell the phantom" |
337 "/ handleArray at:index put:nil. |
356 "/ handleArray at:index put:nil. |
338 "/ tally := tally - 1. |
357 "/ tally := tally - 1. |
339 "/ self informDispose:p. |
358 "/ self informDispose:p. |
363 tally := tally + 1. |
382 tally := tally + 1. |
364 |
383 |
365 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
384 wasBlocked ifFalse:[OperatingSystem unblockInterrupts]. |
366 |
385 |
367 "Modified: 7.1.1997 / 16:56:03 / stefan" |
386 "Modified: 7.1.1997 / 16:56:03 / stefan" |
368 "Modified: 16.4.1997 / 15:21:54 / cg" |
387 "Modified: 7.6.1997 / 13:11:01 / cg" |
369 ! |
388 ! |
370 |
389 |
371 registerChange:anObject |
390 registerChange:anObject |
372 "a registered object has changed, create a new phantom" |
391 "a registered object has changed, create a new phantom" |
373 |
392 |
449 ! ! |
468 ! ! |
450 |
469 |
451 !Registry class methodsFor:'documentation'! |
470 !Registry class methodsFor:'documentation'! |
452 |
471 |
453 version |
472 version |
454 ^ '$Header: /cvs/stx/stx/libbasic/Registry.st,v 1.46 1997-06-02 17:00:44 cg Exp $' |
473 ^ '$Header: /cvs/stx/stx/libbasic/Registry.st,v 1.47 1997-06-07 11:17:35 cg Exp $' |
455 ! ! |
474 ! ! |