Skip to content

Already Borrowed error trying to call a list of callbacks #2465

Answered by SamP20
SamP20 asked this question in Questions
Discussion options

You must be logged in to vote

The issue was with the &mut self. One of the callbacks was calling another method on self (to insert into the event queue) which was resulting in the double borrow. I've replaced them with self_: &PyCell<Self> and ensured there's no outstanding borrows when the callbacks are called

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@bkolligs
Comment options

@bkolligs
Comment options

@adamreichold
Comment options

@bkolligs
Comment options

@davidhewitt
Comment options

Answer selected by SamP20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants