                                       (p/resolve! d v)))))))
      d)))
 
+(defn run-on-context
+  [ctx f]
+  (.runOnContext
+   ^Context ctx
+   ^Handler (reify Handler
+              (handle [_ v']
+                (f ctx)))))
+
 (s/def :vertx.core$verticle/on-start fn?)
 (s/def :vertx.core$verticle/on-stop fn?)
 (s/def :vertx.core$verticle/on-error fn?)

(declare build-actor)
(declare build-disposable)

;; --- Protocols

(definterface IVerticleFactory)

;; --- Public Api

(s/def :vertx.core$system/threads pos?)

  "Creates a verticle instance (factory)."
  [options]
  (s/assert ::verticle-options options)
  ^{::verticle true ::options options}
  (reify
    Supplier
    (get [_] (build-verticle options))))

(defn verticle?
  "Return `true` if `v` is instance of `IVerticleFactory`."
  [v]
  (true? (::verticle (meta v))))

(s/def :vertx.core$actor/on-message fn?)
(s/def ::actor-options
