mirror of
				https://github.com/edera-dev/krata.git
				synced 2025-11-03 23:29:39 +00:00 
			
		
		
		
	krata: reorganize crates
This commit is contained in:
		
							
								
								
									
										12
									
								
								crates/xen/xenevtchn/examples/simple.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								crates/xen/xenevtchn/examples/simple.rs
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
			
		||||
use xenevtchn::error::Result;
 | 
			
		||||
use xenevtchn::EventChannel;
 | 
			
		||||
 | 
			
		||||
#[tokio::main]
 | 
			
		||||
async fn main() -> Result<()> {
 | 
			
		||||
    let channel = EventChannel::open().await?;
 | 
			
		||||
    println!("channel opened");
 | 
			
		||||
    let port = channel.bind_unbound_port(0).await?;
 | 
			
		||||
    println!("port: {}", port);
 | 
			
		||||
    channel.unbind(port).await?;
 | 
			
		||||
    Ok(())
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user