Can't shutdown background threads [Firebase Admin SDK 4.1.5]

Open
#10 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
databases

Research direction

Reproduce the Java 8 example starting at FirebaseApp.initializeApp, FirebaseDatabase.getInstance, and entry.setValue. Trace which background threads remain after the callback and determine the supported lifecycle behavior; done means the daemon-thread or shutdown behavior is clearly established and addressed.

Written by the indexing model from the issue text.

Description

Running this on local machine with Java 8
FirebaseOptions options = new FirebaseOptions.Builder() .setCredential(FirebaseCredentials.applicationDefault()) .setDatabaseUrl("https://" + ServiceOptions.getDefaultProjectId() + ".firebaseio.com/") .build();

firebaseDatabase = FirebaseDatabase.getInstance(FirebaseApp.initializeApp(options)); final DatabaseReference entry = firebaseDatabase.getReference("somereference"); entry.setValue("data",(databaseError, databaseReference) -> System.out.println("ok"));
How can i choose to use daemon threads? And if not, why don't you have a shutdown/close option?

I notice that entry.setValue("data") shutdowns threads normally.

Dominant language
Java
Stars
241
Forks
148
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/quickstart-java

All issues in firebase/quickstart-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.