Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #86102

Re: Design thought for callbacks

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: Design thought for callbacks
Date Sun, 22 Feb 2015 14:12:52 +0200
Organization A noiseless patient Spider
Lines 19
Message-ID <87k2za9mbf.fsf@elektro.pacujo.net> (permalink)
References <33677AE8-B2FA-49F9-9304-C8D93784255D@gmail.com> <mailman.18948.1424497381.18130.python-list@python.org> <87zj87i74p.fsf@elektro.pacujo.net> <mailman.19002.1424607035.18130.python-list@python.org>
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="ff5cf27ef3d5b31f034d3b72bdc27a41"; logging-data="3304"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sqvAMiA14bfpEk59Trtwh"
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:4KZrn9DXGCOHpYDJw8ZmRMH2cBk= sha1:BJn8CEjWU6qzFYWXZTPM7aEt/+g=
Xref csiph.com comp.lang.python:86102

Show key headers only | View raw


Cem Karan <cfkaran2@gmail.com>:

> On Feb 21, 2015, at 11:03 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
>> I use callbacks all the time but haven't had any problems with strong
>> references.
>> 
>> I am careful to move my objects to a zombie state after they're done so
>> they can absorb any potential loose callbacks that are lingering in the
>> system.
>
> So, if I were designing a library for you, you would be willing to have
> a 'zombie' attribute on your callback, correct? This would allow the
> library to query its callbacks to ensure that only 'live' callbacks are
> called. How would you handle closures?

Sorry, don't understand the question.


Marko

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Design thought for callbacks Chris Angelico <rosuav@gmail.com> - 2015-02-21 16:42 +1100
  Re: Design thought for callbacks Marko Rauhamaa <marko@pacujo.net> - 2015-02-21 18:03 +0200
    Re: Design thought for callbacks Cem Karan <cfkaran2@gmail.com> - 2015-02-22 07:10 -0500
      Re: Design thought for callbacks Marko Rauhamaa <marko@pacujo.net> - 2015-02-22 14:12 +0200
        Re: Design thought for callbacks Cem Karan <cfkaran2@gmail.com> - 2015-02-22 08:42 -0500
          Re: Design thought for callbacks Marko Rauhamaa <marko@pacujo.net> - 2015-02-22 15:54 +0200

csiph-web