Skip to content

RFC: Add opinion on @future methods #3

@YodaDaCoda

Description

@YodaDaCoda

@future methods are great, but sometimes you want to call the method synchronously. Propose a convention whereby all future methods do nothing more than call another non-future method. Naming convention for future/non-future method pairs TBC.

e.g.

BAD

@future
public static void myMethod(Account myAccount) {
    // do a whole bunch of things with myAccount
}

GOOD

@future
public static void myMethod_future(Account myAccount) {
    myMethod(myAccount);
}

public static void myMethod(Account myAccount) {
    // do a whole bunch of things with myAccount
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions