Anything related to fail-fast error management strategy, i.e. that software design principle requiring that in case of error a unit of code encapsulation (a module, a function, a method, etc.) should fail in the shortest possible time, reporting a failure to its client code in a clear and unambiguous way.
Questions tagged [fail-fast]
51 questions
2
votes
7 answers
Fail fast iterators in Java
public class Alpha {
public static void main(String[] args) {
ArrayList al = new ArrayList();
al.add("a");
al.add("b");
al.add("c");
al.add("d");
al.add("e");
…

Ramya
- 105
- 1
- 7
2
votes
2 answers
How to make Storm halt on exception?
By default, when a Storm spout or bolt encounters an exception, it restarts the spout or bolt and tries again. Is there any configuration option to make it stop the topology, perhaps after N repeated attempts? (For example, Hadoop tries 4 times…

Jim Pivarski
- 5,568
- 2
- 35
- 47
2
votes
2 answers
Cannot understand this comment about fail-fast
In HashSet.java in JDK 1.6, there are some comments about the fail-fast property of HashSet's iterator.
The iterators returned by this class's iterator method are fail-fast: if the set is modified at any time after the iterator is created, in any…

Heejin
- 4,463
- 3
- 26
- 30
1
vote
1 answer
How can I change my Iterator to be a Fast-fail Iterator?
I'm trying to understand how to modify the Iterator of my Linked List to be fail-fast.
I understand what it means for an Iterator to be fail-fast, but I don't know how exactly should I change my implementation to achieve this behavior.
I was…

May Sohatchevzzki
- 25
- 3
1
vote
0 answers
Error : The application requested process termination through System.Environment.FailFast(string message)
i am in a little bit of a pickle, so about 3 weeks ago i start working on my own wpf project, for some reason when i minimize my window, it crashes (i am just using windowstate to minimize ) and my logging is a usercontrol, i dont see what my…

Sye
- 17
- 5
1
vote
0 answers
Tomcat maxThreads & acceptCount tuning for Fail-Fast
I would like to tune Tomcat to fail-fast in case of any issues when all threads are occupied ( for example, waiting for a database connection if suddenly database starts to perform badly ).
I checked few articles,…

user3489820
- 1,459
- 3
- 22
- 38
1
vote
1 answer
Implementing a fail-fast design with promises in JavaScript
I'm not sure if "fail-fast" is the best way to describe this methodology, but ever since I started to learn about programming I have always been taught to design functions like this:
function doSomething() {
... // do error-prone work here
…

Kenny83
- 769
- 12
- 38
1
vote
2 answers
How Fail-fast Iterator works internally?
I know what is a fail-fast and fail-safe iterator.
Fail-Fast iterators immediately throw ConcurrentModificationException if there is a structural modification of the collection.
Fail-Safe doesn't throw any exception as they work on a clone of…

JAGRITI BANSAL
- 109
- 9
1
vote
2 answers
Will Environment.Exit(int) kill my application with treads running unmanaged code?
I have a windows service which runs unmanaged code (using DllImport) in different threads.
Sometimes, the unmanaged code 'hangs'. Think of while (true) ;. When that happens, I need to kill the entire process (which automatically starts another…

Tvde1
- 1,246
- 3
- 21
- 41
1
vote
0 answers
Is there an elegant way run Go module tests with nested packages in parallel in a fail fast manner?
I have a Go project that uses modules. The module contains many packages, which are nested.
When I let Go figure out the package structure by passing ./... to go test it runs the tests in parallel (the default behaviour).
Testing a single package…

Rok
- 787
- 9
- 17
1
vote
3 answers
Java - Will concurrent modification exception occur while using classic for loop?
Is there is a chance for getting concurrent modification exception occur while using classic for loop?
import java.util.*;
class IterTest{
public static void main(String[] args){
List nums = new ArrayList<>();
…

JavaUser
- 25,542
- 46
- 113
- 139
1
vote
1 answer
What will Environment.FailFast do in .NET Core, when deployed to a Linux environment?
The docs for this method say:
Immediately terminates a process after writing a message to the Windows Application event log, and then includes the message and optional exception information in error reporting to Microsoft.
But what about when…

mikesigs
- 10,491
- 3
- 33
- 40
1
vote
0 answers
throw exceptions for unknown Spring properties
I made a very silly mistake in my Spring Boot app's YAML config:
---
spring:
profiles: local
...
___
spring:
profiles: foo
...
---
spring:
profiles:
active: bar
include: foo
...
I accidentally tried to use…

Nate Glenn
- 6,455
- 8
- 52
- 95
1
vote
0 answers
Fail-Fast Iterator for an Stack
I want to implement a Fail-Fast Iterator to remove Entrys from my own List and test it on correct behaviour.
The List holds Elements of the type MyEntry.
These Entrys hold an Generic Value and a reference to the next Entry.
class MyEntry {
…

Trikalium
- 25
- 6
1
vote
2 answers
Declaring an Iterator before adding elements to a Collection
If you create your own Iterable container class and retrieve a java.util.Iterator over its elements, is there any coding pattern according to which any further additions of elements in the container should not be accessible from the Iterator? I'm…

Jason
- 2,495
- 4
- 26
- 37