| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…irtualMachine to be immutable.
Note that RefCell is not Sync so VirtualMachine will not be accessible from multiple threads with this change. A possible way around this would be to change the RefCell to a Mutex and go with @cthulahoops's solution by returning a PyRef<Frame>. (Because Mutex has no map method.) (This comment actually applies to every other use of RefCell in this project also.) (This isn't to say we shouldn't merge this PR as it still moves in the right direction of allowing us to change from &mut VirtualMachine to &VirtualMachine everywhere.) |
Sorry, something went wrong.
|
I'm aware that this makes it not fully cross thread safe, but it is a good step. We can change each occurence of RefCell into the proper thread safe thing to achieve this. Note that I would like to merge this first, before the second change which involves a lot of search and replace. |
Sorry, something went wrong.
|
I also replaced 'some' occurrences of mut VirtualMachine now. |
Sorry, something went wrong.
|
Okay, how to proceed with this change? I see a lot of merge conflicts coming up. Maybe wait with this a little while and redo the changes? Advice and opinions welcome! |
Sorry, something went wrong.
|
Is there a reason to wait? I thought this was ready to merge (prior to the conflicts) |
Sorry, something went wrong.
|
I would merge the first commit now - it's approved and ready to go. Then do the big remove all the muts as separate PR - no need to review we all know it's coming and what it does. It's going to cause conflicts with in progress work whenever we do it. (I guess that's equivalent to just fixing the merge conflicts and merging this now.) |
Sorry, something went wrong.
|
Yeah, I'd recommend rolling back the &mut VM -> &VM to make merging this easier, and then doing everything at once with sed or something. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This allows for VirtualMachine to be immutable. This is a first work into the direction that VirtualMachine is immutable.
This enables a few things: