Skip to content

Conversation

brson
Copy link
Contributor

@brson brson commented Jan 25, 2013

r? @graydon

This branch removes most uses of oldcomm. It isn't quite ready but I've been at it for a while so I'm posting it for review. Removing the last few usages of oldcomm from std is proving to be time consuming because there's a lot of tricky unsafe code involved. This also won't be mergable until I figure out #4478.

The general strategy:

  • Fix New tasks should always spawn into the default (general) scheduler unless otherwise requested #3760 so task spawning has sane behavior. These changes are going to add some more 'service' tasks that spawn lazily and they should not spawn onto random schedulers.
  • Add a general at_exit facility where the runtime will execute a closure just before shutdown.
  • Add a simple, unsafe 'global data' API. It is simply a way to access a global hash table under a mutex. Uses at_exit for cleanup.
  • Add a new weak task module that uses pipes, at_exit and global data
  • Convert users of the old weak task code and chan_from_global_ptr to the new interfaces
  • Remove the old weak task and chan_from_global_ptr functions
  • Remove oldcomm

Organizationally, this dumps all the new modules under core::private, which I recognize is not right. I intend to reorganize the runtime code as outlined in #2240.

@brson
Copy link
Contributor Author

brson commented Jan 25, 2013

Oh, this also sneaks in my try/finally library, described here, though it's hidden under the private mod.

@brson brson closed this Jan 25, 2013
@brson brson reopened this Jan 25, 2013
@graydon
Copy link
Contributor

graydon commented Jan 25, 2013

Fantastic. r+ with 100 +s

@brson brson merged commit bc0c5bb into rust-lang:incoming Jan 26, 2013
RalfJung added a commit to RalfJung/rust that referenced this pull request Oct 13, 2025
readme: document how to directly invoke the driver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants