Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed some minor spelling errors. #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/fiber/schedule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub type SchedulerId = usize;
/// If a fiber is in runnable state (e.g., not waiting for I/O events),
/// the scheduler will push the fiber in it's run queue.
/// When `run_once` method is called, the first fiber (i.e., future) in the queue
/// will be poped and executed (i.e., `Future::poll` method is called).
/// will be popped and executed (i.e., `Future::poll` method is called).
/// If the future of a fiber moves to readied state,
/// it will be removed from the scheduler.

Expand Down Expand Up @@ -236,7 +236,7 @@ pub struct Context<'a> {
fiber: &'a mut FiberState,
}
impl<'a> Context<'a> {
/// Returns the identifier of the current exeuction context.
/// Returns the identifier of the current execution context.
pub fn context_id(&self) -> super::ContextId {
(self.scheduler.id, self.fiber.fiber_id)
}
Expand Down
2 changes: 1 addition & 1 deletion src/io/poll/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ where
}
pub fn lock(&self) -> EventedLock<T> {
loop {
// NOTE: We assumes conflictions are very rare.
// NOTE: We assume conflicts are very rare.
// (But should be refined in future releases)
if let Some(inner) = self.0.try_borrow_mut() {
return EventedLock(inner);
Expand Down
6 changes: 3 additions & 3 deletions src/io/poll/poller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,9 @@ impl CancelTimeout {

/// A future which will expire at the specified time instant.
///
/// If this object is dropped before expiration, the timer will be cancelled.
/// Thus, for example, the repetation of setting and canceling of
/// a timer only consumpts constant memory region.
/// If this object is dropped before expiration, the timer will be canceled.
/// Thus, for example, the repetition of setting and canceling of
/// a timer only consumes constant memory region.
#[derive(Debug)]
pub struct Timeout {
cancel: Option<CancelTimeout>,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
//! let monitor = executor.spawn_monitor(future);
//! let answer = executor.run_fiber(monitor).unwrap();
//!
//! // Checkes the answer.
//! // Checks the answer.
//! assert_eq!(answer, Ok(55));
//! ```
//!
Expand Down Expand Up @@ -138,7 +138,7 @@
//! // Spawns a fiber to handle the client.
//! handle0.spawn(client.and_then(move |client| {
//! // For simplicity, splits reading process and
//! // writing process into differrent fibers.
//! // writing process into different fibers.
//! let (reader, writer) = (client.clone(), client);
//! let (tx, rx) = fibers::sync::mpsc::channel();
//!
Expand Down
2 changes: 1 addition & 1 deletion src/sync/mpsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ pub fn sync_channel<T>(bound: usize) -> (SyncSender<T>, Receiver<T>) {

/// The receiving-half of a mpsc channel.
///
/// This receving stream will never fail.
/// This receiving stream will never fail.
///
/// This structure can be used on both inside and outside of a fiber.
pub struct Receiver<T> {
Expand Down
4 changes: 2 additions & 2 deletions src/sync/oneshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl<T> fmt::Debug for Receiver<T> {
///
/// // Spawns monitored fiber
/// // (In practice, spawning fiber via `spawn_monitor` function is
/// // more convenient way to archieve the same result)
/// // more convenient way to achieve the same result)
/// executor.spawn_fn(move || {
/// // Notifies the execution have completed successfully.
/// monitored.exit(Ok("succeeded") as Result<_, ()>);
Expand Down Expand Up @@ -199,7 +199,7 @@ impl<T> fmt::Debug for Receiver<T> {
///
/// // Spawns monitored fiber
/// // (In practice, spawning fiber via `spawn_monitor` function is
/// // more convenient way to archieve the same result)
/// // more convenient way to achieve the same result)
/// executor.spawn_fn(move || {
/// let _ = monitored; // This fiber owns `monitored`
/// Ok(()) // Terminated before calling `Monitored::exit` method
Expand Down
6 changes: 3 additions & 3 deletions src/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ pub mod timer {

/// A future which will expire at the specified time instant.
///
/// If this object is dropped before expiration, the timer will be cancelled.
/// Thus, for example, the repetation of setting and canceling of
/// a timer only consumpts constant memory region.
/// If this object is dropped before expiration, the timer will be canceled.
/// Thus, for example, the repetition of setting and canceling of
/// a timer only consumes constant memory region.
#[derive(Debug)]
pub struct Timeout {
start: time::Instant,
Expand Down