Skip to content

Dirty Flag pattern Issue #883

@sajankumarma

Description

@sajankumarma

Creating object of World class inside Thread's Run method doesn't make sense, as every time it is creating new object and reading the file. It should be outside this thread's run method.

for now it is like this
executorService.scheduleAtFixedRate(new Runnable() {
@OverRide
public void run() {
World world = new World();
List countries = world.fetch();

but it should be like this
executorService.scheduleAtFixedRate(new Runnable() {
World world = new World();
@OverRide
public void run() {
List countries = world.fetch();

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions