Feature #1739

Feature #44: Implement basic introspection support

Implement participant creation and destruction hooks

Added by J. Moringen about 10 years ago. Updated over 9 years ago.

Status:ResolvedStart date:03/24/2014
Priority:NormalDue date:03/24/2014
Assignee:J. Moringen% Done:

100%

Category:Python
Target version:rsb-0.11

Associated revisions

Revision 083e34d3
Added by J. Moringen over 9 years ago

Added participant creation and destruction hooks in rsb/__init__.py

fixes #1739

Hooks are collections of callback functions that are called in specific
situations. This commit adds a "participant creation" and a "participant
destruction" hook.

  • rsb/__init__.py (import abc): removed no longer used
    (Hook): new class; implements a simple, synchronized hook
    (participantCreationHook): new global variable; hook for participant
    creation
    (participantDestructionHook): similar for destruction
    (Participant.deactivate): no longer abstract; run
    participantDestructionHook
    (createParticipant): run participantCreationHook
    (Informer.__activate): call activate() method
    (Informer.deactivate): call super's deactivate method
    (Listener.__activate): call activate() method
    (Listener.deactivate): call super's deactivate method
  • rsb/patterns/__init__.py (Method.deactivate): call super's method
    (Server.activate): likewise
    (Server.deactivate): likewise
  • test/coretest.py (HookTest): new test case; check execution of
    creation and destruction hooks for all participant classes

History

#1 Updated by J. Moringen about 10 years ago

  • Status changed from New to In Progress
  • Assignee set to J. Moringen
  • % Done changed from 0 to 50

#2 Updated by J. Moringen about 10 years ago

  • % Done changed from 50 to 70

#3 Updated by J. Moringen almost 10 years ago

  • % Done changed from 70 to 90

#4 Updated by J. Moringen almost 10 years ago

  • Status changed from In Progress to Feedback
  • % Done changed from 90 to 100

Ready to be committed. Maybe after a review.

#5 Updated by J. Moringen over 9 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF