2 cases: outside and inside the Ethereum Virtual Machine (EVM).
Outside the EVM
Yes, race is possible if
eth.getCode is used.
eth.getCode, the next block that your Ethereum client receives, could have a transaction that invoked
selfdestruct on the (greeter) contract.
Inside the EVM
No, if within the EVM in a single transaction, because statements are sequential and there's currently no parallelism (as @Sebi mentions). The EVM equivalent would be to use
extcodecopy. Control flow within the EVM is deterministic.
Yes, race is possible if more than one transaction is used. Within the EVM, it is important to be aware that miners have full control of how transactions are ordered within a block. Transaction Ordering Dependence (TOD) is mentioned in this paper and TOD contracts will usually have a security issue. If a contract C performs
extcodesize for contract D in one transaction, and then performs some action in another transaction (assuming that contract D still exists), then C is vulnerable to an attack: a transaction that does
selfdestruct on D, could be inserted between the 2 transactions of C.