Filter
Exclude
Time range
-
Near
うろ覚えか憶測だけど、旧システムを捨ててProtoFluxになったのはシェーダーを書けるようにするためだったと思う。チラチラと見えるExecutionContextはいまはFrooxEngineしかないけど、シェーダー用のCompile可能な何かが入る余地だと思う。
1
12
496
Replying to @slimjimmy
// TreeInversionOrchestrationFr… package com.enterprise.tree.inversion.orchestration.framework.v2.beta.core; import java.util.*; import java.util.concurrent.*; import java.util.logging.*; import java.lang.reflect.*; /** * Enterprise-grade, production-ready, ISO-27001 compliant * Binary Tree Inversion Solution with Pluggable Architecture */ public class TreeInversionOrchestrationFramework { private static final Logger LOGGER = Logger.getLogger(TreeInversionOrchestrationFramework.class.getName()); // ============= DOMAIN MODEL ============= public static class TreeNode<T extends Comparable<T>> { T value; TreeNode<T> left, right; public TreeNode(T value) { this.value = value; } } // ============= STRATEGY PATTERN ============= public interface InversionStrategy<T extends Comparable<T>> { void invert(TreeNode<T> node); } public interface NodeVisitor<T extends Comparable<T>> { void visit(TreeNode<T> node); } // ============= DECORATOR PATTERN ============= public abstract class BaseInversionStrategy<T extends Comparable<T>> implements InversionStrategy<T> { protected InversionStrategy<T> next; protected MetricsCollector metricsCollector; public void setNext(InversionStrategy<T> next) { this.next = next; } protected void logInversion(TreeNode<T> node) { LOGGER.log(Level.FINE, "Inverting node with value: " node.value); metricsCollector.increment("inversions.count"); } } public class RecursiveInversionStrategy<T extends Comparable<T>> extends BaseInversionStrategy<T> { @Override public void invert(TreeNode<T> node) { if (node == null) return; logInversion(node); TreeNode<T> temp = node.left; node.left = node.right; node.right = temp; invert(node.left); invert(node.right); if (next != null) next.invert(node); } } // ============= FACTORY WITH BUILDER ============= public class InversionStrategyFactory<T extends Comparable<T>> { private final StrategyBuilder<T> builder = new StrategyBuilder<>(); public InversionStrategy<T> createDefaultStrategy() { return builder .withStrategy(new RecursiveInversionStrategy<>()) .withMetricsCollection(true) .withLogging(true) .build(); } } public class StrategyBuilder<T extends Comparable<T>> { private InversionStrategy<T> strategy; private boolean enableMetrics; private boolean enableLogging; public StrategyBuilder<T> withStrategy(InversionStrategy<T> s) { this.strategy = s; return this; } public StrategyBuilder<T> withMetricsCollection(boolean enable) { this.enableMetrics = enable; return this; } public StrategyBuilder<T> withLogging(boolean enable) { this.enableLogging = enable; return this; } public InversionStrategy<T> build() { if (strategy == null) strategy = new RecursiveInversionStrategy<>(); if (enableMetrics && strategy instanceof BaseInversionStrategy) { ((BaseInversionStrategy<T>) strategy) .metricsCollector = new MetricsCollector(); } return new LoggingDecorator<>(strategy, enableLogging); } } // ============= DECORATORS ============= public class LoggingDecorator<T extends Comparable<T>> implements InversionStrategy<T> { private final InversionStrategy<T> delegate; private final boolean enabled; public LoggingDecorator(InversionStrategy<T> delegate, boolean enabled) { this.delegate = delegate; this.enabled = enabled; } @Override public void invert(TreeNode<T> node) { if (enabled) LOGGER.info("Beginning tree inversion operation"); delegate.invert(node); if (enabled) LOGGER.info("Tree inversion operation completed"); } } // ============= METRICS & OBSERVABILITY ============= public class MetricsCollector { private final ConcurrentHashMap<String, Long> metrics = new ConcurrentHashMap<>(); public synchronized void increment(String key) { metrics.merge(key, 1L, Long::sum); } public long getMetric(String key) { return metrics.getOrDefault(key, 0L); } } // ============= CONTEXT & REQUEST OBJECT ============= public class InversionRequest<T extends Comparable<T>> { private final TreeNode<T> root; private final InversionStrategy<T> strategy; private final ExecutionContext context; public InversionRequest(TreeNode<T> root, InversionStrategy<T> strategy) { this.root = root; this.strategy = strategy; this.context = new ExecutionContext(); } public void execute() throws InversionException { try { context.startTimer(); strategy.invert(root); context.stopTimer(); LOGGER.log(Level.INFO, "Execution time: " context.getElapsedMs() "ms"); } catch (Exception e) { throw new InversionException("Operation failed", e); } } } public class ExecutionContext { private long startTime; private long endTime; public void startTimer() { this.startTime = System.currentTimeMillis(); } public void stopTimer() { this.endTime = System.currentTimeMillis(); } public long getElapsedMs() { return endTime - startTime; } } public static class InversionException extends Exception { public InversionException(String msg, Throwable cause) { super(msg, cause); } } // ============= ORCHESTRATOR ============= public class TreeInversionOrchestrator<T extends Comparable<T>> { private final InversionStrategyFactory<T> factory; private final MetricsCollector globalMetrics; public TreeInversionOrchestrator() { this.factory = new InversionStrategyFactory<>(); this.globalMetrics = new MetricsCollector(); } public void invertTree(TreeNode<T> root) throws InversionException { InversionStrategy<T> strategy = factory.createDefaultStrategy(); InversionRequest<T> request = new InversionRequest<>(root, strategy); request.execute(); } } // ============= USAGE ============= public static void main(String[] args) throws InversionException { TreeInversionOrchestrationFramework framework = new TreeInversionOrchestrationFramework(); TreeNode<Integer> root = new TreeNode<>(1); root.left = new TreeNode<>(2); root.right = new TreeNode<>(3); TreeInversionOrchestrator<Integer> orchestrator = framework.new TreeInversionOrchestrator<>(); orchestrator.invertTree(root); System.out.println("Inversion complete. Left: " root.left.value ", Right: " root.right.value); } }

3
4
533
SpringBatch 6系になってFlatFileItemReaderがLineMapper<T>をコンストラクタで取るようになった影響で、LineMapperの実装がExecutionContextを参照してたものがどうにも参照を引き回せなくなっててえらく邪悪なコードを書いて回避する羽目になった🫠 javadoc.io/doc/org.springfra…

1
1
3
853
📣New blog: Using ActiveSupport::​ExecutionContext to improve Rails logging 🚂Learn about a robust solution to a common problem in Rails applications. 🐛It provides a built-in mechanism for propagating context, & thus more debuggable and observable systems. ⬇️
1
2
13
15 Nov 2025
Are bindings a Cloudflare or workerd thing? There's Env, ExecutionContext and Exports (`this.exports`) that are Tags. Then each binding has an interface that needs an Effect variant (KV.put, R2.get, etc.) Everything else is fetch and web sockets.
1
2
359
Replying to @StevenTCramer
IIRC the Web SDK is burning in the project directory at build time? In a file-based app you can get the .cs file path from the ExecutionContext github.com/DamianEdwards/run…
2
2
664
Replying to @ra__semi
درسته تجربه خودمو می‌نویسم اینجا: کلا Task.Factory.StartNew خیلی low-levelه و لزوما به تو await درستی نمیده (فارغ از بحث blocking). اگه دقت کنی resultش اینطوره: Task<Task<T>> که تسک اول فقط await واسه رسوندن workerItemبه OSه. حالا همونجور که اشاره کردی این API از threadpool استفاده نمی‌کنه، پس استفاده از اون با توجه به low-level بودنش باید در یک شرایط و contextخاص اتفاق بیوفته. مثلا من به شخصه بعید میدونم توی وب بدرد بخوره بدلیل ExecutionContext. بیشتر برای اپ‌های کنسولی و ویندوزیه که کنترل بیشتر روی ثردها نیازه. توی ASP اگه چندتا جا ازش استفاده کنی (مثلا توی IHostedService)، احتمالا یا Thread Starvation میخوری، یا OS مصرف Threadت رو throttle میکنه. پس بهتره بجاش همیشه از Task.Run استفاده بشه که صرفا جاب رو بفرستی روی ThreadPool. البته Task.Factory.StartNew خیلی API قدرتمندیه. مثلا توی TaskCreationOptions میتونی PreferFairness رو انتخاب کنی (اکیدا نه در وب، بلکه در سناریوهای خاص غیر وبی) که به OS بگی ترتیب dispatch رو بیخیال شو، هرکدوم آماده شد بده بره.

1
2
42
concretely, along with importable env, this means a worker's signature goes from (req: Request, env: Env, ctx: ExecutionContext) => Response to (req: Request) => Response beautiful.
One of the most requested features in @cloudflare workers will soon be available to public! import { waitUntil } from 'cloudflare:workers'; github.com/cloudflare/worker…
7
2
81
18,203
17 Jul 2025
Sunrise Full Fee Abstraction At a high level, fee abstraction is a layer of indirection between transaction intent and gas settlement: Transaction Fee = f(UserToken, ExecutionContext) → RISE @SunriseLayer abstracts the fee payment interface by embedding a deterministic on-chain asset conversion layer into its transaction pipeline. This allows users and smart contracts to express transaction fees in arbitrary ERC-20 tokens while ensuring final settlement remains in $RISE. Fee Token Declaration Users specify a preferred fee token optional swap parameters Atomic Conversion Layer A protocol-native swap mechanism executes a deterministic conversion of the input token to RISE, atomically and just-in-time. Canonical Settlement Block producers/sequencers receive RISE, ensuring fee predictability and DoS resistance at the protocol level.
21
19
192
27 Jun 2025
This Week in Rails is out, covering better test isolation for CurrentAttribute and ExecutionContext, new methods for cleaner backtrace introspection, IRB_NAME respect in Rails console, isolated steps for Active Job Continuations, improved row counting for PostgreSQL, fixes for strict has_and_belongs_to_many associations, and performance boosts from ignoring Gem.path in file watchers. Read the full edition here: rubyonrails.org/2025/6/27/th…
1
2
22
4,189
ExecutionContextを持ち回すのガチでしんどいから、ライブラリに頼らず標準で何とかならんかったんかみたいな気持ちはある
1
1
4
141
31 Dec 2024
Replying to @Kory__3 @windymelt
それって最初はまさに ExecutionContext の作法くらいしんどい気がしていて (これについては議論の余地があると思う)、であれば、例えば Loom に全部投げて頼るといったアプローチをまずはおススメしておくとみんなハッピーになれるんじゃないかな感はあります
2
2
314
31 Dec 2024
Replying to @Kory__3 @windymelt
まさにこの話ですね speakerdeck.com/th0rikosh1/p… スライド15枚目のように準備した ExecutionContext を使えば、**少なくとも協調的マルチタスキングの部分に関しては**、cats-effect などと似たパフォーマンス特性を得られるんじゃないかと思います (そういう意味で、以前より圧倒的に敷居は下がってそう
1
2
344
20 Dec 2024
🎉TSKaigi アドベントカレンダー 2024【Day 20】公開! 📍12月20日の記事は「【NestJs】ExecutionContextにジェネリクスを渡して型を付けるまで」です! zenn.dev/soramarjr/articles/… #TSKaigi #TSKaigi2025
6
22
2,373
27 Nov 2024
Ever wonder what happens when JavaScript runs your code? 🤔 Our latest blog explains Execution Context in JavaScript: how it manages memory, execution flow, and why it's key to mastering hoisting. 👇 prototyp.digital/blog/what-i… #JavaScript #ExecutionContext
3
36
Today, I'm gonna read a lot of code to take some inspiration 💎 I'm gonna start with ExecutionContext from @ysbaddaden 💯 ExecutionContext is the starting point for Multithreading in @CrystalLanguage 🚀 github.com/ysbaddaden/execut…

1
1
283
20 Sep 2024
そういえば某サービスはしばらく前か本番環境を Java 21 にしてご機嫌に動いてるけど、おかげでブロッキング用の ExecutionContext 作る際に ExecutionContext.fromExecutor(Executors.newVirtualThreadPerTaskExecutor) で楽に作れるようになってはぴはぴ
1
3
12
1,305
あ~あとExecutionContext。 非ブロッキング処理は良いとして、ブロッキング処理が必要になったらどうするんだ? 軽く調べてみた感じ自前でECをそれぞれ用意しておかなければいけないみたい?
1
3
595
Replying to @RajYRaman
This is scary! 🫢I would understand not being able to access the executionContext, but also caching the formContext and gridContext is now unsupported. What should I do with the implementations made so many years , when caching the formContext is declared now unsupported?
1
5
131