Yes, the local scheduler allows this. You probably need to change your parallel preferences to prefer a cluster size of 40. Select the Preferences button, Parallel Computing Toolbox, make sure Local is selected as the default profile, and set the preferred number of workers to 40.
You might need to adjust the number of workers in the local profile to 40 manually. You can do that under the Parallel button, Manage Cluster Profiles, select local, Edit and set to 40.