[ https://issues.apache.org/jira/browse/THRIFT-4777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16763345#comment-16763345 ]
Satyender Yadav edited comment on THRIFT-4777 at 2/8/19 8:54 AM: ----------------------------------------------------------------- [~allengeorge] your guess is right. Here is whats in my mind, correct me if you feel something to be Odd. {code:java} listener = tokio::net::TcpListener(); let runner = listener.incoming().map_err(|e| eprintln!("{?}",e)) .for_each(|socket| { tokio::spawn(ProcessFuture::new(socket)) }) tokio::run(runner);{code} ProcessFuture is not something that exists, but it would be Nonblocking variant of processor.process The above code enables us to listen to incoming data in asynchronous way. Next step in this design is to make processor.process to Read and Write in Async manner. Current processor.process use Read and Write operations on socket which are synch, and they block. So with Sync processor.process I am seeing a panic telling it would block. I am working on how to make processor non blocking for time being. was (Author: hckkid): [~allengeorge] your guess is right. Here is whats in my mind, correct me if you feel something to be Odd. {code:java} listener = tokio::net::TcpListener(); let runner = listener.incoming().map_err(|e| eprintln!("{?}",e)) .for_each(|socket| { tokio::spawn(ProcessFuture::new(sock)) }) tokio::run(runner);{code} The above code enables us to listen to incoming data in asynchronous way. Next step in this design is to make processor.process to Read and Write in Async manner. Current processor.process use Read and Write operations on socket which are synch, and they block. So with Sync processor.process I am seeing a panic telling it would block. I am working on how to make processor non blocking for time being. > Non Blocking Server implementation for Rust > ------------------------------------------- > > Key: THRIFT-4777 > URL: https://issues.apache.org/jira/browse/THRIFT-4777 > Project: Thrift > Issue Type: New Feature > Components: Rust - Library > Reporter: Satyender Yadav > Assignee: Allen George > Priority: Minor > > Implement Non blocking server in Thrift rust library. -- This message was sent by Atlassian JIRA (v7.6.3#76005)