ipc:map   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

(define ipc:map
  (lambda (process-lst func . args-list)
    (let* ((callback-proc (ipc:get-process-name))
           (results '())
           (loopK '()))
      (let ((pos (call/cc (lambda (kk) (set! loopK kk) 0))))
        (if (< pos (length process-lst))
            (let ((z (list-ref process-lst pos))
                  (ags (if (null? args-list) #f (list (list-ref (car args-list) pos)))))
              (let loop ((i *ipc:active-label-cnt*))
                (if (not (null? (vector-ref *ipc:active-labels* i)))
                    (loop (modulo (+ i 1) *ipc:active-label-buffer-size*))
                    (set! *ipc:active-label-cnt* i)))
              (apply ipc:call-async z 'ipc:sync-receive callback-proc
                     *ipc:active-label-cnt* func (if (null? args-list) '() ags))
              (let ((return-val (call/cc (lambda (k)
                                           (vector-set! *ipc:active-labels* *ipc:active-label-cnt* k)
                                           (loopK (+ pos 1))))))
                (set! results (cons return-val results))
                (if (< (length results) (length process-lst))
                    (*sys:toplevel-continuation* 0)
                    results)))
            (*sys:toplevel-continuation*))))))


Back to Index

Similar Entries

  • BTree_map    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • astra_bitmapmask_t    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/orbbec_astra.xtm
  • bitmap_from_window    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/win32.xtm
  • create_heatmap_shader    xtlang    /digego/extempore/tree/v0.8.9/examples/external/shader-tutorials/heatmap.xtm
  • flatmap    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • flatmap    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • flatmap    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • flatmap    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • flatmap    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • flatmap    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • fmap    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • fmap    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • fmap    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • fmap    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • fmap    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • fmap    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • init_env_map    xtlang    /digego/extempore/tree/v0.8.9/examples/external/xtmrender6.xtm
  • ipc:mapcall    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • ipc:proc-name-with-mapping    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • ipc:set-local-remote-mapping    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • map    scheme    /digego/extempore/tree/v0.8.9/runtime/init.xtm
  • map    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • map    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • map    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • map_t    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • map_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • map_test2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • pmap    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • pmap_test    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • pmap_test2    xtlang    /digego/extempore/tree/v0.8.9/examples/core/xthread.xtm
  • rmap    macro    /digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm
  • rmap-loop-runner    macro    /digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm
  • rmap_helper    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm
  • rmap_helper_lst_sym_transform    scheme    /digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm
  • shader_update_envmap    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • smap    xtlang    /digego/extempore/tree/v0.8.9/examples/core/audio_streams.xtm
  • smap    xtlang    /digego/extempore/tree/v0.8.9/examples/core/audio_streams.xtm
  • xtm_envmap_as_skybox    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_envmap_init    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm
  • xtm_envmap_weight    xtlang    /digego/extempore/tree/v0.8.9/libs/external/graphics-pipeline.xtm