python - How to avoid multiple running instances of the same function
<p>In my python script I have a <code>core dumped</code>, and I think it's because the same function is called twice at the same time.</p>

<p>The function is the reading of a Vte terminal in a gtk window</p>

<pre><code>def term(self, dPluzz, donnees=None):
    text = str(self.v.get_text(lambda *a: True).rstrip())
    [...]
    print "Here is the time " + str(time.time())

def terminal(self):    
    self.v = vte.Terminal()
    self.v.set_emulation('xterm')
    self.v.connect ("child-exited", lambda term: self.verif(self, dPluzz))
    self.v.connect("contents-changed", self.term)
</code></pre>

<p>Result:</p>

<pre><code>Here is the time 1474816913.68
Here is the time 1474816913.68
Erreur de segmentation (core dumped)
</code></pre>

<p>How to avoid the double executing of the function?</p>