التزامن المهيكل (حالة المعاينة)
في هذا الدرس 4 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
understand the idea and its status.
الموضوعات المخطط لها
- Structured concurrency: subtasks live inside a scope, and the scope waits for them, so lifetimes are clear.
- A failure can cancel sibling tasks; no leaked threads.
- API:
StructuredTaskScopewith fork and join; its status has been preview and the API has changed (verify version before recording). - Using preview APIs needs
--enable-preview; avoid in production unless the team accepts the risk. - Compare with
CompletableFuturefan-out from MID-006.
تفاصيل المخطط المبدئي
عرض عملي
// conceptual: fork product, stock; join; failure cancels the otherاختبر فهمك
Why is a preview API risky for production?
أظهر الإجابة
It may change or be removed between releases.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.