Sha256: e04b7bcbadf38bb91ae0ae15dafbd6bb0e2e96db4ab66c7dcd5a00959b76ec61
Contents?: true
Size: 633 Bytes
Versions: 93
Compression:
Stored size: 633 Bytes
Contents
--- layout: page title: Polyphony::Cancel parent: API Reference permalink: /api-reference/polyphony-cancel/ --- # Polyphony::Cancel `Polyphony::Cancel` is an exception class used to interrupt a blocking operation with an exception that must be rescued. This exception is will propagate if not rescued. A `Polyphony::Cancel` exception is normally raised using APIs such as `Fiber#cancel!` or `Object#cancel_after`. ```ruby require 'httparty' require 'time' def current_server_time cancel_after(10) do response_body = HTTParty.get(TIME_URL).body Time.parse(response_body) end rescue Polyphony::Cancel Time.now end ```
Version data entries
93 entries across 93 versions & 1 rubygems