[−][src]Function gwasm_api::golem::compute
pub async fn compute<P, S>(
datadir: P,
address: S,
port: u16,
task: Task,
net: Net,
progress_handler: impl ProgressUpdate + 'static,
polling_interval: Option<Duration>
) -> Result<ComputedTask> where
P: Into<PathBuf>,
S: Into<String>,
A convenience function for running a gWasm Task on Golem
This function is essentially an async equivalent of gwasm_api::compute with
two exceptions: 1) it returns a future ComputedTask, and 2) it optionally allows
to specify the polling interval for the task's updates (which by default is set to 2secs).
Note that since the function returns a future, you'll need to set up actix's event loop
to actually execute it, much like it's done for you in gwasm_api::compute.